AP_INVOICES_ALL
Schema: APtransactionOU-striped (ORG_ID)Supplier invoice headers — standard invoices, credit/debit memos, prepayments, and expense reports share the table by type, with amounts, payment status, and the liability account
INVOICE_NUM uniqueness per supplier and operating unit is enforced by the application, NOT by a database unique index in 12.2.2 — join on INVOICE_ID and expect near-duplicates in landed data. GL_DATE places the invoice in a period; INVOICE_DATE is the business date.
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
AP_INVOICES_ALL is the header for its lines in AP_INVOICE_LINES_ALL.
Fields
18 fields · 1 key
| # | Field | Description | Type | Flags |
|---|---|---|---|---|
| 1 | INVOICE_ID | Surrogate key of the invoice — the join key; the invoice number has no database uniqueness | NUMBER | Key |
| 2 | ORG_ID | Operating unit | NUMBER | |
| 3 | INVOICE_NUM | The supplier's invoice number — uniqueness per supplier/OU is application-enforced only | VARCHAR2 | |
| 4 | VENDOR_ID | The supplier | NUMBER | |
| 5 | VENDOR_SITE_ID | The supplier site | NUMBER | |
| 6 | INVOICE_DATE | The invoice's business date — the primary analysis date | DATE | Filter date |
| 7 | INVOICE_AMOUNT | Invoice total | NUMBER | |
| 8 | AMOUNT_PAID | Amount paid to date | NUMBER | |
| 9 | INVOICE_CURRENCY_CODE | Invoice currency | VARCHAR2 | |
| 10 | INVOICE_TYPE_LOOKUP_CODE | Standard, credit/debit memo, prepayment, expense report — a lookup code, undecoded here | VARCHAR2 | |
| 11 | PAYMENT_STATUS_FLAG | Y paid, N unpaid, P partially paid (per the data dictionary's comment) | VARCHAR2 | |
| 12 | SOURCE | The system the invoice arrived through | VARCHAR2 | |
| 13 | TERMS_ID | Payment terms | NUMBER | |
| 14 | GL_DATE | The accounting date placing the invoice in a period | DATE | |
| 15 | ACCTS_PAY_CODE_COMBINATION_ID | The liability account (CCID) | NUMBER | |
| 16 | CANCELLED_DATE | When the invoice was cancelled — NULL if never | DATE | |
| 17 | WFAPPROVAL_STATUS | Invoice-approval workflow state | VARCHAR2 | |
| 18 | PARTY_ID | The supplier's trading-community party (denormalized) | NUMBER |
Field provenance: hand-curated. 1 key field.
Boilerplate SQL
Starting point for reading AP_INVOICES_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 : AP_INVOICES_ALL — Supplier invoice headers — standard invoices, credit/debit memos, prepayments, and expense reports share the table by type, with amounts, payment status, and the liability account
-- Purpose: Column-selected read of AP_INVOICES_ALL — auto-generated from field metadata
-- Grain : One row per operating unit (ORG_ID) + INVOICE_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.INVOICE_ID AS "Surrogate key of the invoice — the join key; the invoice number has no database uniqueness",
t.ORG_ID AS "Operating unit",
t.INVOICE_NUM AS "The supplier's invoice number — uniqueness per supplier/OU is application-enforced only",
t.VENDOR_ID AS "The supplier",
t.VENDOR_SITE_ID AS "The supplier site",
t.INVOICE_DATE AS "The invoice's business date — the primary analysis date",
t.INVOICE_AMOUNT AS "Invoice total",
t.AMOUNT_PAID AS "Amount paid to date",
t.INVOICE_CURRENCY_CODE AS "Invoice currency",
t.INVOICE_TYPE_LOOKUP_CODE AS "Standard, credit/debit memo, prepayment, expense report — a lookup code, undecoded here",
t.PAYMENT_STATUS_FLAG AS "Y paid, N unpaid, P partially paid (per the data dictionary's comment)",
t.SOURCE AS "The system the invoice arrived through",
t.TERMS_ID AS "Payment terms",
t.GL_DATE AS "The accounting date placing the invoice in a period",
t.ACCTS_PAY_CODE_COMBINATION_ID AS "The liability account (CCID)",
t.CANCELLED_DATE AS "When the invoice was cancelled — NULL if never",
t.WFAPPROVAL_STATUS AS "Invoice-approval workflow state",
t.PARTY_ID AS "The supplier's trading-community party (denormalized)"
FROM <catalog>.<schema>.AP_INVOICES_ALL t
WHERE
t.ORG_ID = <operating_unit_id> -- operating unit (MOAC does not filter extracts)
-- AND t.INVOICE_ID = <INVOICE_ID>
-- AND t.INVOICE_DATE >= DATE '<DATE_FROM>'
-- AND t.INVOICE_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.INVOICE_ID;7 parameters not filled: <catalog>, <schema>, <operating_unit_id>, <INVOICE_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 AP_INVOICES_ALL.INVOICE_ID = AP_INVOICE_LINES_ALL.INVOICE_ID AND AP_INVOICES_ALL.ORG_ID = AP_INVOICE_LINES_ALL.ORG_IDON AP_INVOICES_ALL.VENDOR_ID = AP_SUPPLIERS.VENDOR_IDON AP_INVOICES_ALL.VENDOR_SITE_ID = AP_SUPPLIER_SITES_ALL.VENDOR_SITE_ID AND AP_INVOICES_ALL.ORG_ID = AP_SUPPLIER_SITES_ALL.ORG_IDON AP_INVOICES_ALL.ACCTS_PAY_CODE_COMBINATION_ID = GL_CODE_COMBINATIONS.CODE_COMBINATION_IDON AP_INVOICES_ALL.PARTY_ID = HZ_PARTIES.PARTY_ID