AP_INVOICE_DISTRIBUTIONS_ALL
Schema: APtransactionOU-striped (ORG_ID)Supplier invoice distributions — one row per GL-account allocation of an invoice line; the spend-to-account grain payables accounting posts from
Accounting grain — one line fans out across account rows and reversal pairs net to zero; exclude reversals or group by line before comparing to line amounts
The natural key is invoice + line number + distribution line number; INVOICE_DISTRIBUTION_ID is the surrogate. DIST_CODE_COMBINATION_ID is the charge account — the AP tie to the general ledger.
What the badges mean
- Schema: INV
- Schema: the Oracle product schema that owns the table (INV, ONT, WSH, PO, BOM, WIP, MRP, MSC, AR, AP, GL, HR, APPLSYS) — tells you which product family the object belongs to, not who can query it.
- master
- Data class: what the table holds — master data, transaction documents, control/configuration, interface/staging, or an APPS-schema view.
- OU-striped (ORG_ID)
- Rows are scoped to an operating unit. A landed extract carries every operating unit’s rows — filter or join on
ORG_ID, and don’t confuse it withORGANIZATION_ID(see the quirks guide). - Per inventory org
- Rows are scoped to an inventory organization (plant or warehouse) via
ORGANIZATION_ID— a different partition from OU-striped tables (see the quirks guide). - Language-striped
- The table carries a
LANGUAGEcolumn (a _TL translation table or FND_LOOKUP_VALUES) — one row per language. Filter to oneLANGUAGEor a join multiplies rows (see the quirks guide). - View
- This is an APPS-schema convenience view, not a physical table. Extract the base tables it joins instead — views can be slow at scale and aren't guaranteed stable across patches.
Structural facts — how the table is partitioned, not a trap by itself
Join & extract hazards — verify before you rely on this
Fields
16 fields · 1 key
16 fields.
| # | Field | Description | Type | Flags |
|---|---|---|---|---|
| 1 | INVOICE_DISTRIBUTION_ID | Surrogate key of the distribution | NUMBER | Primary-key field |
| 2 | ORG_ID | Operating unit | NUMBER | |
| 3 | INVOICE_ID | The invoice | NUMBER | |
| 4 | INVOICE_LINE_NUMBER | The parent invoice line | NUMBER | |
| 5 | DISTRIBUTION_LINE_NUMBER | Distribution number within the line — completes the natural key | NUMBER | |
| 6 | LINE_TYPE_LOOKUP_CODE | Distribution type — a lookup code, undecoded | VARCHAR2 | |
| 7 | DIST_CODE_COMBINATION_ID | The charge account (CCID) — the AP tie to the general ledger | NUMBER | |
| 8 | AMOUNT | Distribution amount | NUMBER | |
| 9 | BASE_AMOUNT | Amount in the ledger currency | NUMBER | |
| 10 | QUANTITY_INVOICED | Quantity on the distribution | NUMBER | |
| 11 | ACCOUNTING_DATE | The accounting date — the primary analysis date | DATE | The table's primary analysis date — a real DATE column, no conversion needed |
| 12 | PERIOD_NAME | The accounting period | VARCHAR2 | |
| 13 | PO_DISTRIBUTION_ID | The matched PO distribution | NUMBER | |
| 14 | RCV_TRANSACTION_ID | The matched receiving transaction | NUMBER | |
| 15 | POSTED_FLAG | Whether the distribution has been accounted | VARCHAR2 | |
| 16 | REVERSAL_FLAG | Marks reversal pairs that net to zero — exclude before summing | VARCHAR2 |
Field provenance: hand-curated. 1 key field.
Boilerplate SQL
Starting point for reading AP_INVOICE_DISTRIBUTIONS_ALL on Databricks — real DATE columns need no conversion, and the org anchor is already in place. The optional LAST_UPDATE_DATE watermark is included. Set your Unity Catalog location, schema, and org values below; they’re substituted into the SQL and the copy button.
7 parameters not filled: <catalog>, <schema>, <operating_unit_id>, <INVOICE_DISTRIBUTION_ID>, <DATE_FROM>, <DATE_TO>, <watermark>
-- ============================================================
-- Table : AP_INVOICE_DISTRIBUTIONS_ALL — Supplier invoice distributions — one row per GL-account allocation of an invoice line; the spend-to-account grain payables accounting posts from
-- Purpose: Column-selected read of AP_INVOICE_DISTRIBUTIONS_ALL — auto-generated from field metadata
-- Grain : One row per operating unit (ORG_ID) + INVOICE_DISTRIBUTION_ID
-- Caution: Accounting grain — one line fans out across account rows and reversal pairs net to zero; exclude reversals or group by line before comparing to line amounts
-- 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_DISTRIBUTION_ID AS "Surrogate key of the distribution",
t.ORG_ID AS "Operating unit",
t.INVOICE_ID AS "The invoice",
t.INVOICE_LINE_NUMBER AS "The parent invoice line",
t.DISTRIBUTION_LINE_NUMBER AS "Distribution number within the line — completes the natural key",
t.LINE_TYPE_LOOKUP_CODE AS "Distribution type — a lookup code, undecoded",
t.DIST_CODE_COMBINATION_ID AS "The charge account (CCID) — the AP tie to the general ledger",
t.AMOUNT AS "Distribution amount",
t.BASE_AMOUNT AS "Amount in the ledger currency",
t.QUANTITY_INVOICED AS "Quantity on the distribution",
t.ACCOUNTING_DATE AS "The accounting date — the primary analysis date",
t.PERIOD_NAME AS "The accounting period",
t.PO_DISTRIBUTION_ID AS "The matched PO distribution",
t.RCV_TRANSACTION_ID AS "The matched receiving transaction",
t.POSTED_FLAG AS "Whether the distribution has been accounted",
t.REVERSAL_FLAG AS "Marks reversal pairs that net to zero — exclude before summing"
FROM <catalog>.<schema>.AP_INVOICE_DISTRIBUTIONS_ALL t
WHERE
t.ORG_ID = <operating_unit_id> -- operating unit (MOAC does not filter extracts)
-- AND t.INVOICE_DISTRIBUTION_ID = <INVOICE_DISTRIBUTION_ID>
-- AND t.ACCOUNTING_DATE >= DATE '<DATE_FROM>'
-- AND t.ACCOUNTING_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_DISTRIBUTION_ID;Verified September 2026
Relationships
Diagram of 1-hop neighbors — join details below. FND lookup decode and translation edges are highlighted; they’re the joins newcomers most often get wrong.
Join details
ON AP_INVOICE_DISTRIBUTIONS_ALL.INVOICE_ID = AP_INVOICE_LINES_ALL.INVOICE_ID AND AP_INVOICE_DISTRIBUTIONS_ALL.INVOICE_LINE_NUMBER = AP_INVOICE_LINES_ALL.LINE_NUMBER AND AP_INVOICE_DISTRIBUTIONS_ALL.ORG_ID = AP_INVOICE_LINES_ALL.ORG_IDON AP_INVOICE_DISTRIBUTIONS_ALL.DIST_CODE_COMBINATION_ID = GL_CODE_COMBINATIONS.CODE_COMBINATION_IDON AP_INVOICE_DISTRIBUTIONS_ALL.PO_DISTRIBUTION_ID = PO_DISTRIBUTIONS_ALL.PO_DISTRIBUTION_ID AND AP_INVOICE_DISTRIBUTIONS_ALL.ORG_ID = PO_DISTRIBUTIONS_ALL.ORG_ID
More Financials tables
- AP_INVOICE_LINES_ALLSupplier invoice lines — the R12-new layer between header and distributions, carrying line type, amount, and the purchase-order and receipt matching references
- AP_INVOICES_ALLSupplier invoice headers — standard invoices, credit/debit memos, prepayments, and expense reports share the table by type, with amounts, payment status, and the liability account
- AR_CASH_RECEIPTS_ALLCash receipts — one row per customer or miscellaneous receipt with amount, date, status, and reversal detail; application detail against invoices lives in companion tables
- AR_PAYMENT_SCHEDULES_ALLThe open-receivables engine — one row per transaction installment AND one row per receipt, carrying original and remaining amounts, due date, and closure state; what aging, DSO, and collections analytics read
- GL_JE_HEADERSJournal headers — one row per journal within a batch, carrying ledger, source, category, period, posting status, and control totals; where every subledger's accounting lands
- GL_JE_LINESJournal lines — the atomic debit/credit rows against account combinations; the source of trial-balance and account-activity analytics