PO_HEADERS_ALL
Schema: POtransactionOU-striped (ORG_ID)Purchasing document headers — one row per purchase order, agreement, quotation, or RFQ (seven document types share the table), with supplier, buyer, currency, approval status, and closure state; operating-unit striped
SEGMENT1 is the PO number — a naming collision with key flexfields, not a flexfield (the physical unique key is SEGMENT1 + document type + ORG_ID, so PO numbers repeat across operating units). Status columns decode through Purchasing's own lookup table, not the generic FND one.
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
PO_HEADERS_ALL is the header for its lines in PO_LINES_ALL.
Fields
17 fields · 1 key
| # | Field | Description | Type | Flags |
|---|---|---|---|---|
| 1 | PO_HEADER_ID | Surrogate key of the purchasing document header | NUMBER | Key |
| 2 | ORG_ID | Operating unit — PO numbers are unique only within it (plus document type) | NUMBER | |
| 3 | SEGMENT1 | The PO number — a naming collision with key flexfields, not a flexfield; repeats across operating units | VARCHAR2 | |
| 4 | TYPE_LOOKUP_CODE | Document type — standard/blanket/contract families; decodes through the purchasing document-types table, not FND | VARCHAR2 | |
| 5 | AUTHORIZATION_STATUS | Approval status code — decodes through Purchasing's own lookup table (type 'AUTHORIZATION STATUS'), not the generic FND one | VARCHAR2 | |
| 6 | APPROVED_FLAG | Y once approved | VARCHAR2 | |
| 7 | APPROVED_DATE | Last approval date — the primary analysis date (nullable on unapproved documents) | DATE | Filter date |
| 8 | CLOSED_CODE | Closure state — open, closed, closed for invoicing/receiving; Purchasing lookup type 'DOCUMENT STATE' | VARCHAR2 | |
| 9 | CLOSED_DATE | When the document closed | DATE | |
| 10 | CANCEL_FLAG | Y when cancelled — the row persists | VARCHAR2 | |
| 11 | VENDOR_ID | The supplier — joins the supplier master | NUMBER | |
| 12 | VENDOR_SITE_ID | The supplier site — OU-striped on the site table | NUMBER | |
| 13 | AGENT_ID | The buyer | NUMBER | |
| 14 | CURRENCY_CODE | Document currency | VARCHAR2 | |
| 15 | RATE | Currency conversion rate | NUMBER | |
| 16 | COMMENTS | Header comments/description | VARCHAR2 | |
| 17 | FROM_HEADER_ID | The source document this one was created from (a quotation, for example) | NUMBER |
Field provenance: hand-curated. 1 key field.
Boilerplate SQL
Starting point for reading PO_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 : PO_HEADERS_ALL — Purchasing document headers — one row per purchase order, agreement, quotation, or RFQ (seven document types share the table), with supplier, buyer, currency, approval status, and closure state; operating-unit striped
-- Purpose: Column-selected read of PO_HEADERS_ALL — auto-generated from field metadata
-- Grain : One row per operating unit (ORG_ID) + PO_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.PO_HEADER_ID AS "Surrogate key of the purchasing document header",
t.ORG_ID AS "Operating unit — PO numbers are unique only within it (plus document type)",
t.SEGMENT1 AS "The PO number — a naming collision with key flexfields, not a flexfield; repeats across operating units",
t.TYPE_LOOKUP_CODE AS "Document type — standard/blanket/contract families; decodes through the purchasing document-types table, not FND",
t.AUTHORIZATION_STATUS AS "Approval status code — decodes through Purchasing's own lookup table (type 'AUTHORIZATION STATUS'), not the generic FND one",
t.APPROVED_FLAG AS "Y once approved",
t.APPROVED_DATE AS "Last approval date — the primary analysis date (nullable on unapproved documents)",
t.CLOSED_CODE AS "Closure state — open, closed, closed for invoicing/receiving; Purchasing lookup type 'DOCUMENT STATE'",
t.CLOSED_DATE AS "When the document closed",
t.CANCEL_FLAG AS "Y when cancelled — the row persists",
t.VENDOR_ID AS "The supplier — joins the supplier master",
t.VENDOR_SITE_ID AS "The supplier site — OU-striped on the site table",
t.AGENT_ID AS "The buyer",
t.CURRENCY_CODE AS "Document currency",
t.RATE AS "Currency conversion rate",
t.COMMENTS AS "Header comments/description",
t.FROM_HEADER_ID AS "The source document this one was created from (a quotation, for example)"
FROM <catalog>.<schema>.PO_HEADERS_ALL t
WHERE
t.ORG_ID = <operating_unit_id> -- operating unit (MOAC does not filter extracts)
-- AND t.PO_HEADER_ID = <PO_HEADER_ID>
-- AND t.APPROVED_DATE >= DATE '<DATE_FROM>'
-- AND t.APPROVED_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.PO_HEADER_ID;7 parameters not filled: <catalog>, <schema>, <operating_unit_id>, <PO_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_DROP_SHIP_SOURCES.PO_HEADER_ID = PO_HEADERS_ALL.PO_HEADER_ID AND OE_DROP_SHIP_SOURCES.ORG_ID = PO_HEADERS_ALL.ORG_IDON PO_HEADERS_ALL.PO_HEADER_ID = PO_LINES_ALL.PO_HEADER_ID AND PO_HEADERS_ALL.ORG_ID = PO_LINES_ALL.ORG_IDON PO_HEADERS_ALL.VENDOR_ID = AP_SUPPLIERS.VENDOR_IDON PO_HEADERS_ALL.VENDOR_SITE_ID = AP_SUPPLIER_SITES_ALL.VENDOR_SITE_ID AND PO_HEADERS_ALL.ORG_ID = AP_SUPPLIER_SITES_ALL.ORG_IDON PO_HEADERS_ALL.ORG_ID = HR_OPERATING_UNITS.ORGANIZATION_IDON PO_RELEASES_ALL.PO_HEADER_ID = PO_HEADERS_ALL.PO_HEADER_ID AND PO_RELEASES_ALL.ORG_ID = PO_HEADERS_ALL.ORG_IDON MTL_SUPPLY.PO_HEADER_ID = PO_HEADERS_ALL.PO_HEADER_IDON WIP_TRANSACTIONS.PO_HEADER_ID = PO_HEADERS_ALL.PO_HEADER_ID