tables · table
schedulehdramnd
The schedulehdramnd table serves as the Amendment History Header for procurement or production schedules. It stores version-controlled snapshots of schedule headers, tracking changes made to supplier assignments, dates, and associations with Purchase Orders. Every time a schedule is revised, a new entry is created here with an incremented amendno.
Row count
357
Last entry
2026-02-01
Source
tables
Columns
13| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | No | Primary Key |
compcode | string | No | Company Identifier |
schno | integer | No | Schedule Number |
schdate | datetime | Yes | Original Schedule Date |
pono | integer | Yes | Purchase Order Number |
podate | datetime | Yes | Purchase Order Date |
supcode | string | Yes | Supplier/Vendor Code |
type | string | Yes | Schedule Category |
remarks | string | Yes | Revision comments or notes |
amendno | integer | No | Amendment Sequence Number |
amenddate | datetime | Yes | Date the amendment was created |
POAmndNo | string | Yes | Linked PO Amendment Number |
POAmnddate | string | Yes | Linked PO Amendment Date |
Full documentation
### 1. Overview The `schedulehdramnd` table serves as the **Amendment History Header** for procurement or production schedules. It stores version-controlled snapshots of schedule headers, tracking changes made to supplier assignments, dates, and associations with Purchase Orders. Every time a schedule is revised, a new entry is created here with an incremented `amendno`. ### 2. Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | No | Primary Key | | Surrogate Key | | **compcode** | string | No | Company Identifier | e.g., "DAS" | Join Key | | **schno** | integer | No | Schedule Number | | Join Key | | **schdate** | datetime | Yes | Original Schedule Date | | Filtering | | **pono** | integer | Yes | Purchase Order Number | | Join Key | | **podate** | datetime | Yes | Purchase Order Date | | Reporting | | **supcode** | string | Yes | Supplier/Vendor Code | | Join Key | | **type** | string | Yes | Schedule Category | **R**: Raw Material<br>**I**: Item/Finished Good<br>**G**: General | Conditional Joins | | **remarks** | string | Yes | Revision comments or notes | | Documentation | | **amendno** | integer | No | Amendment Sequence Number | 0 = Original, 1+ = Revisions | Versioning | | **amenddate** | datetime | Yes | Date the amendment was created | | Audit/Tracking | | **POAmndNo** | string | Yes | Linked PO Amendment Number | | Cross-reference | | **POAmnddate** | string | Yes | Linked PO Amendment Date | | Cross-reference | ### 3. Relationships & Join Map #### Logical Primary Key The logical uniqueness is defined by the combination of `compcode`, `schno`, and `amendno`. #### Authoritative Joins (via SCHEMA_MAP) * **scheduledtlamnd**: This is the primary child table containing line-item details for the specific amendment. * `JOIN dbo.scheduledtlamnd ON schedulehdramnd.schno = scheduledtlamnd.schno AND schedulehdramnd.compcode = scheduledtlamnd.compcode AND schedulehdramnd.amendno = scheduledtlamnd.amendno` * **suppmas**: To retrieve supplier names and contact details. * `JOIN dbo.suppmas ON schedulehdramnd.supcode = suppmas.supcode AND schedulehdramnd.compcode = suppmas.compcode` * **schedulehdr**: To compare an amendment against the current "active" or "original" schedule. * `JOIN dbo.schedulehdr ON schedulehdramnd.schno = schedulehdr.schno AND schedulehdramnd.compcode = schedulehdr.compcode` * **cpohdr / pohdr**: To link the schedule to its parent Purchase Order. * `JOIN dbo.cpohdr ON schedulehdramnd.pono = cpohdr.pono AND schedulehdramnd.compcode = cpohdr.compcode` #### Conditional Joins (Likely) Based on the `type` column and `Sup_amend_detail` logic: * If `type = 'I'`, join to **itemmas** on `itemcode`. * If `type = 'R'`, join to **rmmas** on `rmcode`. * If `type = 'G'`, join to **citemmas** on `citmcode`.