OOHEAD
Prefix: OAtransactionThe customer order header — one row per order, carrying the customer, order type, dates, and currency, plus the pair of status fields (lowest and highest line status) that summarize where the order's lines stand
Header & line
OOHEAD is the header for its lines in OOLINE.
Fields
12 fields · 2 key
| Key | Field | Alias | Description | Type | Length | Flags |
|---|---|---|---|---|---|---|
| Key | OACONO | CONO | Company | numeric | ||
| Key | OAORNO | ORNO | Customer order number — the key order lines join on | alphanumeric | ||
| OAORSL | ORSL | Lowest line status on the order — with the highest status, brackets where the order's lines stand | alphanumeric | |||
| OAORST | ORST | Highest line status on the order | alphanumeric | |||
| OAORTP | ORTP | Customer order type — the code that drives the order's process flow | alphanumeric | |||
| OACUNO | CUNO | Customer the order belongs to | alphanumeric | |||
| OACUOR | CUOR | Customer's own order reference | alphanumeric | |||
| OAORDT | ORDT | Order date | numeric | |||
| OARLDT | RLDT | Requested delivery date at the header level | numeric | |||
| OACUCD | CUCD | Order currency | alphanumeric | |||
| OAFACI | FACI | Facility the order is processed in | alphanumeric | |||
| OAWHLO | WHLO | Default warehouse for the order's lines | alphanumeric |
Field provenance: hand-curated.
Boilerplate SQL
Starting point for reading OOHEADon Databricks — numeric YYYYMMDD dates are wrapped to NULL, verified status ladders are decoded, and the CONO anchor is in place. Set your Unity Catalog location, company, and filter values below; they’re substituted into the SQL and the copy button.
-- ============================================================
-- Table : OOHEAD — The customer order header — one row per order, carrying the customer, order type, dates, and currency, plus the pair of status fields (lowest and highest line status) that summarize where the order's lines stand
-- Purpose: Column-selected read of OOHEAD — auto-generated from field metadata
-- Grain : One row per company (CONO) + OAORNO
-- Notes : Auto-generated skeleton for Infor Data Lake-landed M3 data. Dates are numeric YYYYMMDD (0 = none, mapped to NULL); status ladders decoded inline where verified. Audit columns (RGDT/RGTM/LMDT/CHNO/CHID) omitted — see the quirks guide.
-- ============================================================
SELECT
oh.OACONO AS "Company",
oh.OAORNO AS "Customer order number — the key order lines join on",
CASE oh.OAORSL WHEN '10' THEN 'Preliminary' WHEN '20' THEN 'Final (entered)' WHEN '22' THEN 'Not allocated' WHEN '23' THEN 'Partially allocated' WHEN '33' THEN 'Allocated' WHEN '44' THEN 'Picking list printed' WHEN '66' THEN 'Delivered' WHEN '77' THEN 'Invoiced' ELSE oh.OAORSL END AS "Lowest line status on the order — with the highest status, brackets where the order's lines stand", -- status: ORST
CASE oh.OAORST WHEN '10' THEN 'Preliminary' WHEN '20' THEN 'Final (entered)' WHEN '22' THEN 'Not allocated' WHEN '23' THEN 'Partially allocated' WHEN '33' THEN 'Allocated' WHEN '44' THEN 'Picking list printed' WHEN '66' THEN 'Delivered' WHEN '77' THEN 'Invoiced' ELSE oh.OAORST END AS "Highest line status on the order", -- status: ORST
oh.OAORTP AS "Customer order type — the code that drives the order's process flow",
oh.OACUNO AS "Customer the order belongs to",
oh.OACUOR AS "Customer's own order reference",
CASE WHEN oh.OAORDT = 0 THEN NULL ELSE TO_DATE(CAST(CAST(oh.OAORDT AS BIGINT) AS STRING), 'yyyyMMdd') END AS "Order date", -- YYYYMMDD, 0 → NULL
CASE WHEN oh.OARLDT = 0 THEN NULL ELSE TO_DATE(CAST(CAST(oh.OARLDT AS BIGINT) AS STRING), 'yyyyMMdd') END AS "Requested delivery date at the header level", -- YYYYMMDD, 0 → NULL
oh.OACUCD AS "Order currency",
oh.OAFACI AS "Facility the order is processed in",
oh.OAWHLO AS "Default warehouse for the order's lines"
FROM <catalog>.<schema>.OOHEAD oh
WHERE
oh.OACONO = <company>
-- AND oh.OAORNO = '<ORNO>'
-- AND oh.OAORDT >= <DATE_FROM> -- yyyyMMdd numeric
-- AND oh.OAORDT <= <DATE_TO> -- yyyyMMdd numeric
ORDER BY oh.OAORNO;6 parameters not filled: <catalog>, <schema>, <company>, <ORNO>, <DATE_FROM>, <DATE_TO>
Relationships
1-hop neighbors — click a table to navigate there. CSYTAB decode edges are highlighted; they’re the joins newcomers most often get wrong.
Join details
ON OOHEAD.OAORNO = OOLINE.OBORNO AND OOHEAD.OACONO = OOLINE.OBCONOON OOHEAD.OACUNO = OCUSMA.OKCUNO AND OOHEAD.OACONO = OCUSMA.OKCONOON ODHEAD.UAORNO = OOHEAD.OAORNO AND ODHEAD.UACONO = OOHEAD.OACONOON OOHEAD.OAFACI = CFACIL.CFFACI AND OOHEAD.OACONO = CFACIL.CFCONO
Programs That Use This Table
- OIS100Customer order entry — creates and maintains customer orders, writing the OOHEAD/OOLINE pairPrimary sourceInteractive
- OIS100MICustomer order API — creates, reads, and maintains customer orders programmaticallyPrimary sourceAPI
- OIS300Customer order overview — the order-book view planners and customer service work fromPrimary sourceInteractive