All tables
tables · table

mrprejdtl

The mrprejdtl table stores the granular detail of rejections recorded during the manufacturing or material return process (specifically linked to Returnable Gate Passes - RGP). It tracks rejections at the item and operation level, documenting both the quantity rejected and the quantity subsequently issued (likely for scrap disposal or return to vendor). This table is the detail-level counterpart to mrprejhdr.

Row count
7
Last entry
Source
tables

Columns

7
ColumnTypeNullableMeaning
indexintegerNOPrimary key; unique record identifier.
compcodestringNOCompany identifier code.
rgpnointegerNOReturnable Gate Pass Number.
itemcodestringNOThe unique identifier for the material or product.
oprcodestringNOOperation code where the rejection occurred.
qtyrejnumberYESThe total quantity of the item rejected during this step.
qtyrejissuednumberYESThe quantity of rejected items that have been issued out.

Full documentation

### 1) Overview
 The `mrprejdtl` table stores the granular detail of rejections recorded during the manufacturing or material return process (specifically linked to Returnable Gate Passes - RGP). It tracks rejections at the item and operation level, documenting both the quantity rejected and the quantity subsequently issued (likely for scrap disposal or return to vendor). This table is the detail-level counterpart to `mrprejhdr`.
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | NO | Primary key; unique record identifier. | | `PK` |
 | **compcode** | string | NO | Company identifier code. | e.g., "DAS" | `FK`, `JOIN` |
 | **rgpno** | integer | NO | Returnable Gate Pass Number. | | `FK`, `JOIN` |
 | **itemcode** | string | NO | The unique identifier for the material or product. | e.g., "CP-016" | `FK`, `JOIN` |
 | **oprcode** | string | NO | Operation code where the rejection occurred. | e.g., "MILLING", "CC" | `FK`, `JOIN` |
 | **qtyrej** | number | YES | The total quantity of the item rejected during this step. | | `AGGREGATE` |
 | **qtyrejissued** | number | YES | The quantity of rejected items that have been issued out. | | `STATISTICAL` |
 
 ### 3) Relationships & Join Map
 
 #### Parent Table
 * **dbo.mrprejhdr**: The primary header for these records.
  * Join on: `mrprejdtl.compcode = mrprejhdr.compcode` AND `mrprejdtl.rgpno = mrprejhdr.rgpno`
 
 #### Master Data Joins
 * **dbo.itemmas**: To retrieve item descriptions and master specs.
  * Join on: `mrprejdtl.compcode = itemmas.compcode` AND `mrprejdtl.itemcode = itemmas.itemcode`
 * **dbo.oprmas**: To retrieve the full name of the manufacturing operation.
  * Join on: `mrprejdtl.compcode = oprmas.compcode` AND `mrprejdtl.oprcode = oprmas.oprcode`
 * **dbo.rgpdtl**: Links to the specific RGP line items.
  * Join on: `mrprejdtl.compcode = rgpdtl.compcode` AND `mrprejdtl.rgpno = rgpdtl.rgpno`
 
 #### Transactional Joins
 * **dbo.vlrmdtl**: Likely used for vendor-related rejection matching.
  * Join on: `mrprejdtl.compcode = vlrmdtl.compcode` AND `mrprejdtl.rgpno = vlrmdtl.rgpno`
 * **dbo.mrci_rep**: Joins with Material Receipt/Inspection reports.
  * Join on: `mrprejdtl.compcode = mrci_rep.compcode` AND `mrprejdtl.itemcode = mrci_rep.itemcode` AND `mrprejdtl.rgpno = mrci_rep.rgpno`