tables · table
tmpmrphdr
The tmpmrphdr table serves as a header-level data store for Material Requirement Planning (MRP) and Material Receipt processing, specifically tracking materials transitioning through production stages or vendor processing. It captures the audit trail for quantities across various statuses: Challan (sent), Received, Accepted, Rejected, and Scrapped.
Row count
12
Last entry
2026-01-15
Source
tables
Columns
28| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | No | Primary Key |
compcode | string | No | Company Identifier |
mrpno | integer | No | MRP Document Number |
mrpdate | datetime | Yes | Date of MRP generation |
jobno | number | Yes | Associated Production Job Order |
rmmrpno | integer | Yes | Raw Material MRP Reference |
chno | number | Yes | Challan (Delivery Note) Number |
chdate | datetime | Yes | Challan Issuance Date |
vendcode | string | Yes | Unique Vendor/Supplier Code |
itemcode | string | Yes | Internal Finished/Process Item Code |
chqty | string | Yes | Challan Quantity (String format) |
recqty | string | Yes | Received Quantity (String format) |
acptqty | string | Yes | Accepted Quantity (String format) |
rejqty | string | Yes | Rejected Quantity (String format) |
scrapqty | string | Yes | Scrapped Quantity (String format) |
chqty2 | number | Yes | Challan Quantity (Numeric) |
recqty2 | number | Yes | Received Quantity (Numeric) |
acptqty2 | number | Yes | Accepted Quantity (Numeric) |
rejqty2 | number | Yes | Rejected Quantity (Numeric) |
scrapqty2 | number | Yes | Scrapped Quantity (Numeric) |
wooprqty | number | Yes | Work Order Operation Quantity |
uom | string | Yes | Unit of Measure |
mtime | string | Yes | Modification/Transaction Time |
final_status | string | Yes | Current state of the material |
rework | string | Yes | Rework eligibility flag |
lotno | string | Yes | Manufacturing Lot/Batch number |
ItemCodeIssue | string | Yes | Item code at time of issue |
ItemNameIssue | string | Yes | Item description at time of issue |
Full documentation
### 1) Overview The `tmpmrphdr` table serves as a header-level data store for Material Requirement Planning (MRP) and Material Receipt processing, specifically tracking materials transitioning through production stages or vendor processing. It captures the audit trail for quantities across various statuses: Challan (sent), Received, Accepted, Rejected, and Scrapped. Key functional areas include: * **Job Tracking:** Linking MRP numbers to specific production Job numbers (`jobno`). * **Vendor Management:** Recording movements to/from external vendors (`vendcode`). * **Quantity Reconciliation:** Dual-tracking of quantities (likely raw input vs. converted/secondary units, as seen in `chqty` vs `chqty2`). * **Quality Control:** Recording rework status and final processing state (`final_status`). ### 2) Column dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | No | Primary Key | Auto-incrementing index | `PRIMARY KEY` | | **compcode** | string | No | Company Identifier | e.g., "DAS" | `JOIN`, `WHERE` | | **mrpno** | integer | No | MRP Document Number | Unique transaction ID | `JOIN`, `FILTER` | | **mrpdate** | datetime | Yes | Date of MRP generation | | `RANGE` | | **jobno** | number | Yes | Associated Production Job Order | | `JOIN` | | **rmmrpno** | integer | Yes | Raw Material MRP Reference | | `JOIN` (Likely) | | **chno** | number | Yes | Challan (Delivery Note) Number | | `JOIN` | | **chdate** | datetime | Yes | Challan Issuance Date | | `ORDER BY` | | **vendcode** | string | Yes | Unique Vendor/Supplier Code | e.g., "NEELIN" | `JOIN` | | **itemcode** | string | Yes | Internal Finished/Process Item Code | e.g., "CSPLATE" | `JOIN` | | **chqty** | string | Yes | Challan Quantity (String format) | | `DISPLAY` | | **recqty** | string | Yes | Received Quantity (String format) | | `DISPLAY` | | **acptqty** | string | Yes | Accepted Quantity (String format) | | `DISPLAY` | | **rejqty** | string | Yes | Rejected Quantity (String format) | | `DISPLAY` | | **scrapqty** | string | Yes | Scrapped Quantity (String format) | | `DISPLAY` | | **chqty2** | number | Yes | Challan Quantity (Numeric) | e.g., 533.0 | `AGGREGATE` | | **recqty2** | number | Yes | Received Quantity (Numeric) | | `AGGREGATE` | | **acptqty2** | number | Yes | Accepted Quantity (Numeric) | | `AGGREGATE` | | **rejqty2** | number | Yes | Rejected Quantity (Numeric) | | `AGGREGATE` | | **scrapqty2** | number | Yes | Scrapped Quantity (Numeric) | | `AGGREGATE` | | **wooprqty** | number | Yes | Work Order Operation Quantity | | `CALCULATION` | | **uom** | string | Yes | Unit of Measure | e.g., "PCS" | `WHERE` | | **mtime** | string | Yes | Modification/Transaction Time | | `AUDIT` | | **final_status** | string | Yes | Current state of the material | "WIP", "CLOSED" | `FILTER` | | **rework** | string | Yes | Rework eligibility flag | "N", "Y" | `WHERE` | | **lotno** | string | Yes | Manufacturing Lot/Batch number | e.g., "28539J-1" | `JOIN` | | **ItemCodeIssue** | string | Yes | Item code at time of issue | | `AUDIT` | | **ItemNameIssue** | string | Yes | Item description at time of issue | | `DISPLAY` | ### 3) Relationships & join map #### Logical Joins The table acts as a central hub for manufacturing logistics, connecting procurement, production, and inventory. * **MRP Details:** Joins with `tmpmrpdtl` (`mrpno`, `compcode`) for operation-specific weights/details. * **Job Management:** Joins with `jobhdr` (`mrpno`, `compcode`) or `job` (`jobno`, `compcode`) to track material usage against specific orders. * **Quality & Inspection:** Joins with `mrcirhdr` (`mrpno`, `compcode`) or `goodreceipt` (`mrpno`, `itemcode`) to correlate header data with specific inspection results. * **Vendor Masters:** Joins with `vendmas` (`vendcode`, `compcode`) to retrieve vendor contact or location details. * **Item Master:** Joins with `itemmas` (`itemcode`, `compcode`) for standard specifications and part names. #### Join Map | Source Table | Source Column | Target Table | Target Column | | :--- | :--- | :--- | :--- | | `tmpmrphdr` | `mrpno` | `dbo.fghdr` | `mrpno` | | `tmpmrphdr` | `mrpno` | `dbo.jobhdr` | `mrpno` | | `tmpmrphdr` | `mrpno` | `dbo.mrcirhdr` | `mrpno` | | `tmpmrphdr` | `mrpno` | `dbo.tmpmrpdtl` | `mrpno` | | `tmpmrphdr` | `itemcode` | `dbo.itemmas` | `itemcode` | | `tmpmrphdr` | `itemcode` | `dbo.saleitemmas` | `itemcode` | | `tmpmrphdr` | `vendcode` | `dbo.vendmas` | `vendcode` | | `tmpmrphdr` | `jobno` | `dbo.job` | `jobno` | | `tmpmrphdr` | `lotno` | `dbo.product2` | `lotno` | | `tmpmrphdr` | `chno` | `dbo.ChallanBinTrayHDR` | `chno` |