All tables
tables · table

sfpoamnd

The sfpoamnd table serves as the header repository for Semi-Finished (SF) Purchase Order Amendments. It tracks the version history of Purchase Orders, capturing changes to commercial terms, delivery schedules, and authorization statuses. Unlike the primary PO header, this table records incremental modifications (amndno) to maintain a complete audit trail of the procurement lifecycle.

Row count
405
Last entry
2026-01-13
Source
tables

Columns

23
ColumnTypeNullableMeaning
indexintegerNoInternal primary key.
compcodestringNoCompany identifier.
pononumberNoPurchase Order Number.
amndnointegerNoAmendment Sequence Number.
podatedatetimeYesOriginal PO Date.
supcodestringYesSupplier Code.
indentnointegerYesReference to the purchase requisition.
deliverydatetimeYesRevised delivery deadline.
f_o_rstringYesFreight on Road / Delivery Terms.
usernamestringYesUser who created the amendment.
addtimestringYesCreation timestamp.
quotnostringYesSupplier quotation reference.
quotdatedatetimeYesSupplier quotation date.
amnddatedatetimeYesDate this specific amendment was recorded.
authflagintegerYesAuthorization status.
wefdatedatetimeYes"With Effect From" date for terms.
povaluestringYesTotal numeric value of the PO (as string).
povaluewordstringYesTotal PO value in words.
invyearintegerNoFinancial accounting year.
consigneestringYesShipping destination / Recipient entity.
podocstringYesPhysical PO document reference.
cancel_flagstringYesCancellation status of the amendment.
lockstringYesRow-level locking status for edits.

Full documentation

### 1) Overview
 The `sfpoamnd` table serves as the **header repository for Semi-Finished (SF) Purchase Order Amendments**. It tracks the version history of Purchase Orders, capturing changes to commercial terms, delivery schedules, and authorization statuses. Unlike the primary PO header, this table records incremental modifications (`amndno`) to maintain a complete audit trail of the procurement lifecycle.
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | No | Internal primary key. | Auto-increment | Primary Key |
 | **compcode** | string | No | Company identifier. | e.g., "DAS" | Join / Filter |
 | **pono** | number | No | Purchase Order Number. | | Join Key |
 | **amndno** | integer | No | Amendment Sequence Number. | 0 (Original), 1, 2... | Join / Versioning |
 | **podate** | datetime | Yes | Original PO Date. | | Filtering |
 | **supcode** | string | Yes | Supplier Code. | Link to `suppmas` | Join (Supplier) |
 | **indentno** | integer | Yes | Reference to the purchase requisition. | Link to `sfindent` | Join (Requisition) |
 | **delivery** | datetime | Yes | Revised delivery deadline. | | Scheduling |
 | **f_o_r** | string | Yes | Freight on Road / Delivery Terms. | e.g., "ROHTAK" | Commercial Terms |
 | **term_1..7** | string | Yes | Standardized commercial clauses (Payment, Tax, etc). | e.g., "30 DAYS" | Reporting |
 | **username** | string | Yes | User who created the amendment. | | Audit |
 | **addtime** | string | Yes | Creation timestamp. | | Audit |
 | **quotno** | string | Yes | Supplier quotation reference. | | Procurement Ref |
 | **quotdate** | datetime | Yes | Supplier quotation date. | | Procurement Ref |
 | **amnddate** | datetime | Yes | Date this specific amendment was recorded. | | Versioning |
 | **authflag** | integer | Yes | Authorization status. | 0=Draft, 1=Authorized | Validation |
 | **wefdate** | datetime | Yes | "With Effect From" date for terms. | | Effective Date |
 | **povalue** | string | Yes | Total numeric value of the PO (as string). | | Financials |
 | **povalueword**| string | Yes | Total PO value in words. | | Printing |
 | **invyear** | integer | No | Financial accounting year. | e.g., 2013 | Join Key |
 | **consignee** | string | Yes | Shipping destination / Recipient entity. | | Logistics |
 | **podoc** | string | Yes | Physical PO document reference. | | Document Link |
 | **cancel_flag**| string | Yes | Cancellation status of the amendment. | 'N', 'Y', NULL | Filter |
 | **lock** | string | Yes | Row-level locking status for edits. | 'N', 'Y', NULL | Concurrency |
 
 ### 3) Relationships & Join Map
 
 #### Parent PO (Header)
 * **sfpoamnd** (Likely) joins to **sfpo** on `compcode`, `pono`, and `invyear`. This table represents the historical snapshots, while `sfpo` typically contains the current active version.
 
 #### Amendment Details (Lines)
 * **sfpoamnd** joins to **sfpoitemamnd** on `compcode`, `pono`, `invyear`, and `amndno`. (Confirmed via REFERENCE_JSON).
 
 #### External References
 * **Supplier Details:** Joins to **suppmas** (`supcode`) on `compcode` and `supcode`.
 * **Requisition Link:** Joins to **sfindent** (`indentno`) on `compcode` and `indentno`.
 * **Company Context:** Joins to **company** (`compcode`) on `compcode`.