OE_ORDER_HEADERS_ALL
Schema: ONTtransactionOU-striped (ORG_ID)The sales order header — one row per order or quote, carrying the order number, type, customer references, currency, and the workflow status the whole order-to-cash cycle hangs off; operating-unit striped
Naming trap: SOLD_TO_ORG_ID, SHIP_TO_ORG_ID, and INVOICE_TO_ORG_ID are TCA customer account and site-use ids, not organizations; SHIP_FROM_ORG_ID is an inventory org (warehouse); ORG_ID is the operating unit — three different concepts sharing one suffix. ORDER_NUMBER is unique only together with order type and version, never alone. Cancelled orders keep their rows.
What the badges mean
- master
- Data class: what the table holds — master data, transaction documents, control/configuration, interface/staging, or an APPS-schema view.
Header & line
OE_ORDER_HEADERS_ALL is the header for its lines in OE_ORDER_LINES_ALL.
Fields
18 fields · 1 key
| # | Field | Description | Type | Flags |
|---|---|---|---|---|
| 1 | HEADER_ID | Surrogate key of the order header — what lines, holds, adjustments, and shipping rows join on | NUMBER | Key |
| 2 | ORG_ID | Operating unit the order belongs to — the MOAC stripe, not a warehouse | NUMBER | |
| 3 | ORDER_NUMBER | The user-facing order number — unique only together with order type and version, never alone | NUMBER | |
| 4 | ORDER_TYPE_ID | The order transaction type — workflow, defaults, and category come from it | NUMBER | |
| 5 | VERSION_NUMBER | Document version — part of the real unique key with order number and type | NUMBER | |
| 6 | ORDER_CATEGORY_CODE | Order, return, or mixed | VARCHAR2 | |
| 7 | FLOW_STATUS_CODE | Workflow-derived header status — a code, not a display name; header and line statuses diverge | VARCHAR2 | FLOW_STATUS |
| 8 | BOOKED_FLAG | Y once the order is booked | VARCHAR2 | |
| 9 | OPEN_FLAG | Y while the order is still open | VARCHAR2 | |
| 10 | CANCELLED_FLAG | Y when fully cancelled — the row persists | VARCHAR2 | |
| 11 | ORDERED_DATE | When the order was placed — the primary analysis date (nullable on quotes and drafts) | DATE | Filter date |
| 12 | BOOKED_DATE | When the order was booked | DATE | |
| 13 | SOLD_TO_ORG_ID | The customer ACCOUNT (a TCA id) — not an organization, despite the name | NUMBER | |
| 14 | SHIP_TO_ORG_ID | The customer ship-to SITE USE (a TCA id) — not an organization either | NUMBER | |
| 15 | SHIP_FROM_ORG_ID | Default ship-from warehouse — this one IS an org: an inventory organization | NUMBER | |
| 16 | TRANSACTIONAL_CURR_CODE | The order currency | VARCHAR2 | |
| 17 | CUST_PO_NUMBER | The customer's own PO reference | VARCHAR2 | |
| 18 | ORDER_SOURCE_ID | Where the order came from — decodes through the order source master | NUMBER |
Field provenance: hand-curated. 1 key field.
Boilerplate SQL
Starting point for reading OE_ORDER_HEADERS_ALLon Databricks — real DATE columns need no conversion, and the org anchor and the LAST_UPDATE_DATE watermark are already in place. Set your Unity Catalog location, schema, and org values below; they’re substituted into the SQL and the copy button.
-- ============================================================
-- Table : OE_ORDER_HEADERS_ALL — The sales order header — one row per order or quote, carrying the order number, type, customer references, currency, and the workflow status the whole order-to-cash cycle hangs off; operating-unit striped
-- Purpose: Column-selected read of OE_ORDER_HEADERS_ALL — auto-generated from field metadata
-- Grain : One row per operating unit (ORG_ID) + HEADER_ID
-- Notes : Auto-generated skeleton for Oracle EBS R12 data landed in your lakehouse. Dates are real DATE/TIMESTAMP columns — no conversion needed. WHO audit columns omitted (see the quirks guide); the optional LAST_UPDATE_DATE watermark filter supports incremental extracts.
-- ============================================================
SELECT
t.HEADER_ID AS "Surrogate key of the order header — what lines, holds, adjustments, and shipping rows join on",
t.ORG_ID AS "Operating unit the order belongs to — the MOAC stripe, not a warehouse",
t.ORDER_NUMBER AS "The user-facing order number — unique only together with order type and version, never alone",
t.ORDER_TYPE_ID AS "The order transaction type — workflow, defaults, and category come from it",
t.VERSION_NUMBER AS "Document version — part of the real unique key with order number and type",
t.ORDER_CATEGORY_CODE AS "Order, return, or mixed",
t.FLOW_STATUS_CODE AS "Workflow-derived header status — a code, not a display name; header and line statuses diverge", -- decode t.FLOW_STATUS_CODE via FND_LOOKUP_VALUES (LOOKUP_TYPE = 'FLOW_STATUS', LANGUAGE-filtered) — see quirks guide #lookups
t.BOOKED_FLAG AS "Y once the order is booked",
t.OPEN_FLAG AS "Y while the order is still open",
t.CANCELLED_FLAG AS "Y when fully cancelled — the row persists",
t.ORDERED_DATE AS "When the order was placed — the primary analysis date (nullable on quotes and drafts)",
t.BOOKED_DATE AS "When the order was booked",
t.SOLD_TO_ORG_ID AS "The customer ACCOUNT (a TCA id) — not an organization, despite the name",
t.SHIP_TO_ORG_ID AS "The customer ship-to SITE USE (a TCA id) — not an organization either",
t.SHIP_FROM_ORG_ID AS "Default ship-from warehouse — this one IS an org: an inventory organization",
t.TRANSACTIONAL_CURR_CODE AS "The order currency",
t.CUST_PO_NUMBER AS "The customer's own PO reference",
t.ORDER_SOURCE_ID AS "Where the order came from — decodes through the order source master"
FROM <catalog>.<schema>.OE_ORDER_HEADERS_ALL t
WHERE
t.ORG_ID = <operating_unit_id> -- operating unit (MOAC does not filter extracts)
-- AND t.HEADER_ID = <HEADER_ID>
-- AND t.ORDERED_DATE >= DATE '<DATE_FROM>'
-- AND t.ORDERED_DATE <= DATE '<DATE_TO>'
-- AND t.LAST_UPDATE_DATE >= TIMESTAMP '<watermark>' -- WHO watermark, bulk-stamped by batch jobs; see quirks guide #who-columns
ORDER BY t.HEADER_ID;7 parameters not filled: <catalog>, <schema>, <operating_unit_id>, <HEADER_ID>, <DATE_FROM>, <DATE_TO>, <watermark>
Relationships
1-hop neighbors — click a table to navigate there. FND lookup decode and translation edges are highlighted; they’re the joins newcomers most often get wrong.
Join details
ON OE_ORDER_HEADERS_ALL.HEADER_ID = OE_ORDER_LINES_ALL.HEADER_ID AND OE_ORDER_HEADERS_ALL.ORG_ID = OE_ORDER_LINES_ALL.ORG_IDON OE_ORDER_HEADERS_ALL.ORDER_TYPE_ID = OE_TRANSACTION_TYPES_ALL.TRANSACTION_TYPE_ID AND OE_ORDER_HEADERS_ALL.ORG_ID = OE_TRANSACTION_TYPES_ALL.ORG_IDON OE_ORDER_HEADERS_ALL.ORDER_SOURCE_ID = OE_ORDER_SOURCES.ORDER_SOURCE_IDON OE_ORDER_HEADERS_ALL.SHIP_FROM_ORG_ID = MTL_PARAMETERS.ORGANIZATION_IDON OE_ORDER_HEADERS_ALL.ORG_ID = HR_OPERATING_UNITS.ORGANIZATION_IDON OE_ORDER_HEADERS_ALL.FLOW_STATUS_CODE = FND_LOOKUP_VALUES.LOOKUP_CODE AND FND_LOOKUP_VALUES.LOOKUP_TYPE = 'FLOW_STATUS' AND FND_LOOKUP_VALUES.LANGUAGE = '<language>'ON OE_ORDER_HOLDS_ALL.HEADER_ID = OE_ORDER_HEADERS_ALL.HEADER_ID AND OE_ORDER_HOLDS_ALL.ORG_ID = OE_ORDER_HEADERS_ALL.ORG_IDON OE_PRICE_ADJUSTMENTS.HEADER_ID = OE_ORDER_HEADERS_ALL.HEADER_IDON OE_DROP_SHIP_SOURCES.HEADER_ID = OE_ORDER_HEADERS_ALL.HEADER_ID AND OE_DROP_SHIP_SOURCES.ORG_ID = OE_ORDER_HEADERS_ALL.ORG_IDON WSH_DELIVERY_DETAILS.SOURCE_HEADER_ID = OE_ORDER_HEADERS_ALL.HEADER_ID AND WSH_DELIVERY_DETAILS.ORG_ID = OE_ORDER_HEADERS_ALL.ORG_ID