tables · table
pmcdtl2
The pmcdtl2 table serves as a transactional detail record for production issue documents (referenced in system logic as "Production Issues" or "ProdIss"). It captures the specific operations, rates, and item details associated with a specific issue number (issueno). In the context of the ERP's inventory modules, this table is frequently used to calculate Finished Goods (FG) stock levels, particularly by identifying operations marked with an oprcode of 'CLOSE' to signify the completion of a production stage.
Row count
796,652
Last entry
—
Source
tables
Columns
8| Column | Type | Nullable | Meaning |
|---|---|---|---|
compcode | string | No | Unique identifier for the company/entity. |
issueno | integer | No | Foreign key linking to the production issue header. |
oprcode | string | Yes | Operation code identifying the specific process step. |
oprrate | number | Yes | Financial rate or cost associated with the operation. |
itemcode | string | Yes | Unique identifier for the manufactured part or material. |
uom | string | Yes | Unit of Measure for the production item. |
grade | string | Yes | Material quality or grade specification. |
hrc | string | Yes | Hardness Rockwell C scale specification. |
Full documentation
### 1) Overview The `pmcdtl2` table serves as a transactional detail record for production issue documents (referenced in system logic as "Production Issues" or "ProdIss"). It captures the specific operations, rates, and item details associated with a specific issue number (`issueno`). In the context of the ERP's inventory modules, this table is frequently used to calculate Finished Goods (FG) stock levels, particularly by identifying operations marked with an `oprcode` of 'CLOSE' to signify the completion of a production stage. ### 2) Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **compcode** | string | No | Unique identifier for the company/entity. | e.g., "DAS", "BPL" | Join key for multi-tenant data isolation. | | **issueno** | integer | No | Foreign key linking to the production issue header. | | Primary join key to `pmchdr2`. | | **oprcode** | string | Yes | Operation code identifying the specific process step. | e.g., 'C', 'FC1', 'CLOSE' | Used for filtering completed stages (`'CLOSE'`). | | **oprrate** | number | Yes | Financial rate or cost associated with the operation. | e.g., 0.0 | Used for production costing. | | **itemcode** | string | Yes | Unique identifier for the manufactured part or material. | e.g., "CP-058" | Join key to `itemmas`. | | **uom** | string | Yes | Unit of Measure for the production item. | e.g., "PCS", "KG" | Standardizing quantities. | | **grade** | string | Yes | Material quality or grade specification. | | Metadata for quality tracking. | | **hrc** | string | Yes | Hardness Rockwell C scale specification. | | Quality/Technical specification. | ### 3) Relationships & Join Map #### Parent Table (Header) * **dbo.pmchdr2**: The primary relationship is established between `pmcdtl2` (Detail) and `pmchdr2` (Header) using `issueno` and `compcode`. This is used to link the issue date (`prdate`) from the header to the specific items in the detail. #### Reference Tables * **dbo.itemmas**: Joins on `itemcode` and `compcode` to retrieve descriptive metadata like `itemname` and `partno`. * **dbo.oprmas**: (Likely) Joins on `oprcode` and `compcode` to fetch operation descriptions. * **dbo.UoMMaster**: (Likely) Joins on `uom` (mapped to `CUoM` or `PUoM`) for unit conversions. #### Join Examples ```sql -- Calculate Finished Goods Production Issue Quantity SELECT p.issueno, p.prdate, q.itemcode, SUM(p.pcs) as TotalPcs FROM dbo.pmchdr2 p INNER JOIN dbo.pmcdtl2 q ON p.issueno = q.issueno AND p.compcode = q.compcode WHERE q.oprcode = 'CLOSE' GROUP BY p.issueno, p.prdate, q.itemcode; ```