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
- master
- Data class: what the table holds — master data, transaction documents, control/configuration, interface/staging, or an APPS-schema view.
Fields
16 fields · 1 key
| # | Field | Description | Type | Flags |
|---|---|---|---|---|
| 1 | INVOICE_DISTRIBUTION_ID | Surrogate key of the distribution | NUMBER | Key |
| 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 | Filter date |
| 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_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_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;7 parameters not filled: <catalog>, <schema>, <operating_unit_id>, <INVOICE_DISTRIBUTION_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_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