tables · table
rmjobrec2nd
The rmjobrec2nd table serves as the primary transaction log for the 2nd Stage Job Receipts. It tracks the return or receipt of processed items from sub-contractors or specific internal work centers associated with job cards. It captures quantities received, the original requirements, lot/heat number traceability, and gate pass (GP) information. This table is a critical component for inventory balance calculations and reconciling job work in progress (WIP).
Row count
8,788
Last entry
2026-01-16
Source
tables
Columns
26| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | NO | Internal primary key identifier. |
compcode | string | NO | Company identifier. |
mrpno | integer | NO | Material Receipt Plan/Note Number. |
mrpdate | datetime | YES | Date of the material receipt. |
pjobcardno | number | YES | Parent Job Card Number. |
pjobdate | datetime | YES | Date of the parent job card. |
custcode | string | YES | Customer or Vendor code involved. |
itemcode | string | YES | Code for the item being received. |
qty | number | YES | Actual quantity received. |
uom | string | YES | Unit of Measure. |
itemcodereq | string | YES | The item code that was originally required. |
reqty | number | YES | The quantity originally requested for processing. |
remarks | string | YES | User comments or transaction notes. |
lotno | string | YES | Production lot number for traceability. |
useradd | string | YES | ID of the user who created the record. |
addtime | string | YES | Timestamp of record creation. |
gpno | integer | YES | Gate Pass Number associated with inward movement. |
gpdate | datetime | YES | Date of the gate pass. |
wono | number | YES | Work Order Number. |
itemvalue | number | YES | Financial value of the received items. |
location | string | YES | Physical or logical inventory location. |
authflag | number | YES | Authorization status flag. |
heatno | string | YES | Raw material heat/batch number. |
nOprCode | string | YES | Next Operation Code or Current Op Code. |
JobDoc | string | YES | Reference to physical job document. |
AdjQty | string | YES | Adjustment quantity (if applicable). |
Full documentation
### 1. Overview The `rmjobrec2nd` table serves as the primary transaction log for the **2nd Stage Job Receipts**. It tracks the return or receipt of processed items from sub-contractors or specific internal work centers associated with job cards. It captures quantities received, the original requirements, lot/heat number traceability, and gate pass (GP) information. This table is a critical component for inventory balance calculations and reconciling job work in progress (WIP). ### 2. Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | NO | Internal primary key identifier. | | Primary Key | | **compcode** | string | NO | Company identifier. | e.g., "DAS", "RF2" | Join Key (Universal) | | **mrpno** | integer | NO | Material Receipt Plan/Note Number. | Unique per receipt | Join Key (Transactions) | | **mrpdate** | datetime | YES | Date of the material receipt. | | Filtering/Reporting | | **pjobcardno** | number | YES | Parent Job Card Number. | | Join Key (Likely `jobhdr.jobcardno`) | | **pjobdate** | datetime | YES | Date of the parent job card. | | Reporting | | **custcode** | string | YES | Customer or Vendor code involved. | e.g., "KOYO", "BAP-M" | Join Key (`dbo.cust`) | | **itemcode** | string | YES | Code for the item being received. | | Join Key (`dbo.itemmas`) | | **qty** | number | YES | Actual quantity received. | | Aggregation | | **uom** | string | YES | Unit of Measure. | PCS, KGS | Conversion logic | | **itemcodereq** | string | YES | The item code that was originally required. | | Comparison/Validation | | **reqty** | number | YES | The quantity originally requested for processing. | | Reconcilliation | | **remarks** | string | YES | User comments or transaction notes. | | Descriptive | | **lotno** | string | YES | Production lot number for traceability. | | Join Key (Traceability) | | **useradd** | string | YES | ID of the user who created the record. | | Audit | | **addtime** | string | YES | Timestamp of record creation. | | Audit | | **gpno** | integer | YES | Gate Pass Number associated with inward movement. | | Logistical tracking | | **gpdate** | datetime | YES | Date of the gate pass. | | Reporting | | **wono** | number | YES | Work Order Number. | | Join Key (`dbo.woselect4bill`) | | **itemvalue** | number | YES | Financial value of the received items. | | Financial Reporting | | **location** | string | YES | Physical or logical inventory location. | | Join Key (`dbo.location`) | | **authflag** | number | YES | Authorization status flag. | 1 = Authorized | Filtering | | **heatno** | string | YES | Raw material heat/batch number. | | Join Key (Traceability) | | **nOprCode** | string | YES | Next Operation Code or Current Op Code. | MS, CF, BC | Join Key (`dbo.oprmas`) | | **JobDoc** | string | YES | Reference to physical job document. | | Reference | | **AdjQty** | string | YES | Adjustment quantity (if applicable). | | Reconciliation | ### 3. Relationships & Join Map #### Joins (Strictly per SCHEMA_MAP) * **dbo.cust**: Join via `compcode` and `custcode` to retrieve customer names for reporting (e.g., used in `GERegister`). * **dbo.itemmas**: Join via `compcode` and `itemcode` to get item descriptions, part numbers, and HSN codes. * **dbo.oprmas**: Join via `compcode` and `nOprCode` (mapped to `oprcode`) to identify operational stages. * **dbo.rmjobrec2nddtl**: Join via `compcode`, `mrpno`, and `itemcode` to access operation-level rates and rework details. * **dbo.DESP2JOB**: Join via `compcode` and `mrpno` to calculate balances between what was received in 2nd stage vs. what was dispatched. * **dbo.invdesphdr**: Join via `compcode` and `mrpno` to link manufacturing receipts to final sales invoices. * **dbo.adjqty**: Join via `compcode`, `itemcode`, and `lotno` for inventory adjustments at the operation level. #### View Integration * **viewLotHeatComconied**: Combines `lotno` and `heatno` from this table with `product2`, `fghdr`, and `mrcirhdr` for master traceability. * **viewinwardgateregister**: Aggregates `gpno` and `gpdate` from this table for a master gate entry log.