tables · table
sfpoitemamnd
The sfpoitemamnd table serves as the historical line-item repository for Semi-Finished (SF) Purchase Order Amendments. It records the specific state of items (quantities, rates, and descriptions) associated with a particular amendment number (amndno) for a Purchase Order. This table is critical for auditing changes to procurement contracts and generating historical PO documents.
Row count
3,602
Last entry
—
Source
tables
Columns
12| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | No | Internal primary key for the row. |
compcode | string | No | Unique identifier for the company/entity. |
pono | integer | No | Purchase Order Number. |
itemcode | string | No | Code representing the semi-finished item. |
uom | string | Yes | Unit of Measure. |
qty | number | Yes | Quantity of the item at the time of amendment. |
itemrate | number | Yes | Unit price of the item for this specific amendment. |
amndno | integer | No | Amendment revision number. |
invyear | integer | No | Financial or Invoice year associated with the PO. |
hsn | string | Yes | Harmonized System of Nomenclature code for taxation. |
sno | string | Yes | Serial/Line number of the item within the PO. |
itemexdetail | string | Yes | Extended description or technical details for the item. |
Full documentation
### 1) Overview The `sfpoitemamnd` table serves as the historical line-item repository for **Semi-Finished (SF) Purchase Order Amendments**. It records the specific state of items (quantities, rates, and descriptions) associated with a particular amendment number (`amndno`) for a Purchase Order. This table is critical for auditing changes to procurement contracts and generating historical PO documents. ### 2) Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | No | Internal primary key for the row. | | Primary Key | | **compcode** | string | No | Unique identifier for the company/entity. | e.g., "DAS" | Join; Filter | | **pono** | integer | No | Purchase Order Number. | | Join; Grouping | | **itemcode** | string | No | Code representing the semi-finished item. | e.g., "CP-000" | Join; Filter | | **uom** | string | Yes | Unit of Measure. | e.g., "PCS" | Reporting | | **qty** | number | Yes | Quantity of the item at the time of amendment. | | Calculation | | **itemrate** | number | Yes | Unit price of the item for this specific amendment. | | Calculation | | **amndno** | integer | No | Amendment revision number. | 0 = Original, >0 = Revisions | Join; Versioning | | **invyear** | integer | No | Financial or Invoice year associated with the PO. | e.g., 2013 | Join; Filter | | **hsn** | string | Yes | Harmonized System of Nomenclature code for taxation. | | Tax Reporting | | **sno** | string | Yes | Serial/Line number of the item within the PO. | | Ordering | | **itemexdetail**| string | Yes | Extended description or technical details for the item. | | Reporting | ### 3) Relationships & Join Map The `sfpoitemamnd` table acts as a child table for amendments, capturing specific item snapshots that correspond to header-level changes in the procurement workflow. #### Physical Joins (SCHEMA_MAP Authoritative) * **sfpoamnd (Header)**: Joins on `compcode`, `pono`, `invyear`, and `amndno`. This links the item snapshots to the specific amendment header details (like amendment date and reason). * **itemmas (Item Master)**: Joins on `compcode` and `itemcode`. Used to retrieve the descriptive `itemname`, `partno`, and other material properties. * **sfpoitem (Current Items)**: Joins on `compcode`, `pono`, `invyear`, and `itemcode`. Used to compare current PO states against historical amendment states. * **sfindent (Requisition)**: Likely joined via the header `sfpoamnd (indentno)` to trace the line item back to the original semi-finished material requisition. #### Usage Context (REFERENCE_JSON Inference) * **Document Generation**: Utilized in `dbo.PurchaseOrderDoc` to reproduce the "Snapshot" of a PO at a specific point in time when `POType = 'S'`. * **Unified View**: Integrated into `viewALLPOAmend` along with Raw Material and Consumable amendments to provide a holistic view of all procurement revisions.