All tables
tables · table

templotqty

The templotqty table is a transaction-level temporary storage table used to track accepted quantities (acptqty) associated with specific manufacturing lots and material heat numbers. It provides traceability for batches (lots) and sub-batches (sub-lots) along with metallurgical heat identification, typically used during quality inspection or production reporting workflows.

Row count
11
Last entry
Source
tables

Columns

7
ColumnTypeNullableMeaning
indexintegerNOPrimary key; internal unique record identifier.
compcodestringNOCompany Code; unique identifier for the business entity.
lotnostringYESThe primary batch or lot number for the item.
acptqtyintegerYESThe quantity of items accepted from the specified lot.
heatnostringYESThe metallurgical heat number associated with the raw material.
sublotnostringYESAn identifier for a specific portion or container within a lot.
variantstringYESProduct variation or revision identifier.

Full documentation

### 1) Overview
 The `templotqty` table is a transaction-level temporary storage table used to track accepted quantities (`acptqty`) associated with specific manufacturing lots and material heat numbers. It provides traceability for batches (lots) and sub-batches (sub-lots) along with metallurgical heat identification, typically used during quality inspection or production reporting workflows.
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | NO | Primary key; internal unique record identifier. | 0, 1, 2... | `ORDER BY index` |
 | **compcode** | string | NO | Company Code; unique identifier for the business entity. | e.g., "DAS" | `WHERE compcode = 'DAS'` |
 | **lotno** | string | YES | The primary batch or lot number for the item. | e.g., "11522P-4" | `JOIN`, `GROUP BY` |
 | **acptqty** | integer | YES | The quantity of items accepted from the specified lot. | > 0 | `SUM(acptqty)` |
 | **heatno** | string | YES | The metallurgical heat number associated with the raw material. | e.g., "58814" | Traceability joins |
 | **sublotno** | string | YES | An identifier for a specific portion or container within a lot. | Often matches lotno | Secondary grouping |
 | **variant** | string | YES | Product variation or revision identifier. | Likely Null/String | Filtering variants |
 
 ### 3) Relationships & Join Map
 
 The `templotqty` table serves as a bridge between production lots and inventory/invoice records. Based on the physical schema, the following joins are authoritative:
 
 #### Peer Traceability Tables
 * **dbo.tempFGlotqty**: Near-identical structure; likely used for finished goods staging. Join via `lotno`, `heatno`, and `compcode`.
 * **dbo.RMproduct1 / dbo.product2**: These tables contain production details. Joins on `lotno` and `sublotno` allow linking accepted quantities to specific machine shifts and operators.
 
 #### Quality & Inspection
 * **dbo.iteminspectionhdr**: Join on `lotno` and `compcode` to link physical quantities to detailed inspection reports and hardness readings.
 
 #### Invoicing & Despatch
 * **dbo.invdtl / dbo.Performainvdtl**: Join on `lotno` and `compcode` to verify which specific material batches were shipped against an invoice.
 * **dbo.invlotdetail**: Join on `lotno` and `compcode` to track batch-wise shipment quantities.
 
 #### Job Work & RM
 * **dbo.jobhdr / dbo.rmjobhdr**: Join on `lotno` and `compcode` to reconcile issued material against accepted production quantities in job work scenarios.