All tables
tables · table

onlinerej_hdr

The onlinerej_hdr table serves as the header for online rejection and scrap transactions within the production environment. It records administrative and identifying information for material that fails quality standards during processing. Key metadata includes the rejection date, the specific machine (mc_code) where the rejection occurred, the work shift, and lot tracking identifiers (lotno, sublotno). It also handles returns-to-supplier logic and classifies rejections via flags (e.g., Scrap vs. Rework).

Row count
12,401
Last entry
2026-01-16
Source
tables

Columns

20
ColumnTypeNullableMeaning
indexintegerNoPrimary key identifier
compcodestringYesCompany code for multi-tenant identification
onlinerej_nointegerYesUnique rejection document number
onlinerej_datedatetimeYesDate when the rejection was recorded
mc_codestringYesMachine code where rejection occurred
rettosupplierstringYesIndicator if the item is being returned to the supplier
rejflagstringYesClassification of the rejection
shiftstringYesProduction shift identifier
lotnostringYesManufacturing lot number
variantstringYesProduct variant identifier
sublotnostringYesManufacturing sub-lot number
vscodestringYesVendor or Supplier code associated with the rejection
vstypestringYesType of entity in `vscode`
locationstringYesPhysical or department location code
ItemTypestringYesCategory of the item rejected
RemarksstringYesGeneral notes regarding the rejection
useraddstringYesUser who created the record
addtimestringYesTimestamp of record creation
usermodstringYesUser who last modified the record
modtimestringYesTimestamp of last modification

Full documentation

### 1. Overview
 The `onlinerej_hdr` table serves as the header for online rejection and scrap transactions within the production environment. It records administrative and identifying information for material that fails quality standards during processing. Key metadata includes the rejection date, the specific machine (`mc_code`) where the rejection occurred, the work shift, and lot tracking identifiers (`lotno`, `sublotno`). It also handles returns-to-supplier logic and classifies rejections via flags (e.g., Scrap vs. Rework).
 
 ### 2. Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | No | Primary key identifier | | Primary Key |
 | **compcode** | string | Yes | Company code for multi-tenant identification | e.g., "DAS", "OMA" | Join; filtering |
 | **onlinerej_no** | integer | Yes | Unique rejection document number | | Join to `onlinerej_dtl` |
 | **onlinerej_date** | datetime | Yes | Date when the rejection was recorded | | Filtering; reporting |
 | **mc_code** | string | Yes | Machine code where rejection occurred | | Join to `machine` (mccode) |
 | **rettosupplier** | string | Yes | Indicator if the item is being returned to the supplier | "Y", "N" | Conditional logic |
 | **rejflag** | string | Yes | Classification of the rejection | 'F' (Finished), 'O' (Online Scrap), 'R' (Reject), 'S' (Scrap) | Filtering; categorizing rejections |
 | **shift** | string | Yes | Production shift identifier | "A", "B", "C" | Grouping; audit |
 | **lotno** | string | Yes | Manufacturing lot number | | Join; tracking |
 | **variant** | string | Yes | Product variant identifier | | Tracking |
 | **sublotno** | string | Yes | Manufacturing sub-lot number | | Tracking |
 | **vscode** | string | Yes | Vendor or Supplier code associated with the rejection | | Join to `vendmas` or `suppmas` |
 | **vstype** | string | Yes | Type of entity in `vscode` | 'V' (Vendor), 'S' (Supplier) | Conditional join logic |
 | **location** | string | Yes | Physical or department location code | | Join to `location` |
 | **ItemType** | string | Yes | Category of the item rejected | 'I' (Item), 'R' (Raw Material) | Logic branching |
 | **Remarks** | string | Yes | General notes regarding the rejection | | Descriptive reporting |
 | **useradd** | string | Yes | User who created the record | | Audit |
 | **addtime** | string | Yes | Timestamp of record creation | | Audit |
 | **usermod** | string | Yes | User who last modified the record | | Audit |
 | **modtime** | string | Yes | Timestamp of last modification | | Audit |
 
 ### 3. Relationships & Join Map
 
 #### Parent Relationships
 * **machine**: Join `mc_code` to `machine.mccode` (along with `compcode`) to retrieve machine names and specifications.
 * **location**: Join `location` to `location.location` (along with `compcode`) for department/site names.
 * **vendmas**: Join `vscode` to `vendmas.vendcode` (along with `compcode`) when `vstype` = 'V'.
 * **suppmas**: Join `vscode` to `suppmas.supcode` (along with `compcode`) when `vstype` = 'S'.
 
 #### Child Relationships
 * **onlinerej_dtl**: Join `onlinerej_no` and `compcode` to `onlinerej_dtl.onlinerej_no` and `onlinerej_dtl.compcode` to retrieve specific line items, rejected quantities, and reasons.
 
 #### Related Contexts (Likely)
 * **product1 / product2**: Linked via `lotno` for tracing rejections back to specific production runs.
 * **itemmas**: Linked indirectly through `onlinerej_dtl.itemcode` to identify part numbers and descriptions.