All tables
tables · table

oaTenTativeMhdr

The oaTenTativeMhdr table serves as the Header for Tentative Order Acceptances (OA). It stores high-level scheduling and contractual information for orders that are in a "tentative" or "draft" status, typically used for material requirement planning (MRP) before a firm order is finalized. This table tracks customer details, purchase order references, and the validity period of the tentative schedule.

Row count
1
Last entry
2026-01-31
Source
tables

Columns

13
ColumnTypeNullableMeaning
indexintegerNOInternal primary key / identity.
compcodestringNOCompany identifier code.
oanointegerNOOrder Acceptance Number.
oadatedatetimeNODate the tentative OA was created.
custcodestringNOUnique code for the customer.
ponostringYESCustomer's Purchase Order number.
podatedatetimeYESDate of the customer's Purchase Order.
schdatefromdatetimeYESStart date of the tentative schedule.
schdatetodatetimeYESEnd date of the tentative schedule.
amendnostringYESAmendment number for revisions.
amenddatestringYESDate the amendment was made.
reasonstringYESReason for the tentative entry or amendment.
custSchNostringYESCustomer's internal schedule reference number.

Full documentation

# Table Documentation: oaTenTativeMhdr
 
 ## 1. Overview
 The `oaTenTativeMhdr` table serves as the **Header** for **Tentative Order Acceptances (OA)**. It stores high-level scheduling and contractual information for orders that are in a "tentative" or "draft" status, typically used for material requirement planning (MRP) before a firm order is finalized. This table tracks customer details, purchase order references, and the validity period of the tentative schedule.
 
 ## 2. Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | NO | Internal primary key / identity. | | Primary Key |
 | **compcode** | string | NO | Company identifier code. | e.g., "DAS" | Join; Filtering |
 | **oano** | integer | NO | Order Acceptance Number. | | Join; Grouping |
 | **oadate** | datetime | NO | Date the tentative OA was created. | | Filtering; Range Scan |
 | **custcode** | string | NO | Unique code for the customer. | e.g., "HML-G" | Join (dbo.cust) |
 | **pono** | string | YES | Customer's Purchase Order number. | | Filtering |
 | **podate** | datetime | YES | Date of the customer's Purchase Order. | | Reporting |
 | **schdatefrom** | datetime | YES | Start date of the tentative schedule. | | Planning |
 | **schdateto** | datetime | YES | End date of the tentative schedule. | | Planning |
 | **amendno** | string | YES | Amendment number for revisions. | | Versioning |
 | **amenddate** | string | YES | Date the amendment was made. | | Tracking |
 | **reason** | string | YES | Reason for the tentative entry or amendment. | | Remarks |
 | **custSchNo** | string | YES | Customer's internal schedule reference number. | | Cross-ref |
 
 ## 3. Relationships & Join Map
 
 ### Primary Relationships (Confirmed via SCHEMA_MAP)
 * **dbo.oaTenTativeMdtl**: The most frequent join. One header (`oaTenTativeMhdr`) has many lines (`oaTenTativeMdtl`).
  * **Join Condition**: `oaTenTativeMhdr.oano = oaTenTativeMdtl.oano AND oaTenTativeMhdr.compcode = oaTenTativeMdtl.compcode`
 * **dbo.cust**: To retrieve customer master details (Name, Address, GST).
  * **Join Condition**: `oaTenTativeMhdr.custcode = cust.custcode AND oaTenTativeMhdr.compcode = cust.compcode`
 
 ### Likely Relationships (Inferred from Schema Pattern)
 * **dbo.oahdr**: Likely a parallel structure for "Final" Order Acceptances.
  * **Join Condition**: `oaTenTativeMhdr.oano = oahdr.oano` (Used when comparing tentative vs. firm schedules).
 * **dbo.CompanyConfig**: To check form-level settings for OA entries.
  * **Join Condition**: `oaTenTativeMhdr.compcode = CompanyConfig.compcode`
 
 ### Reference Summary (from SQL Stored Procedure)
 The table is used in `RMREQGen` to calculate tentative material requirements. It filters by `oadate` between specific planning dates and joins with `oaTenTativeMdtl` to aggregate quantities.