Skip to content
EBS Reference

AP_INVOICE_LINES_ALL

Schema: APtransactionOU-striped (ORG_ID)

Supplier invoice lines — the R12-new layer between header and distributions, carrying line type, amount, and the purchase-order and receipt matching references

Module: FinancialsOperating-unit striped (ORG_ID)Header: AP_INVOICES_ALL
Grain note

ITEM, TAX, FREIGHT, and MISC lines share the table — filter LINE_TYPE_LOOKUP_CODE before summing spend, and exclude discarded/cancelled lines

Notes

New in R12 — 11i had only distributions, a release delta worth knowing when comparing old extracts. No surrogate line id: the key is INVOICE_ID + LINE_NUMBER, and children reference the line by that pair.

What the badges mean
master
Data class: what the table holds — master data, transaction documents, control/configuration, interface/staging, or an APPS-schema view.
In field listings, K marks a primary-key field.

Header & line

AP_INVOICE_LINES_ALL lines join back to their header AP_INVOICES_ALL — and the org column — so a line never fans out.

Fields

18 fields · 2 key

Table fields: position, field name, description, data type, and flags. 18 fields.
#FieldDescriptionTypeFlags
1INVOICE_IDThe invoice — key together with the line number; no surrogate line id existsNUMBER
Key
2LINE_NUMBERLine number within the invoice — part of the keyNUMBER
Key
3ORG_IDOperating unitNUMBER
4LINE_TYPE_LOOKUP_CODEItem, tax, freight, or miscellaneous line — a lookup code, undecoded; filter before summing spendVARCHAR2
5AMOUNTLine amountNUMBER
6BASE_AMOUNTLine amount in the ledger currencyNUMBER
7QUANTITY_INVOICEDQuantity invoicedNUMBER
8UNIT_PRICEUnit priceNUMBER
9INVENTORY_ITEM_IDThe item, for item-matched linesNUMBER
10ITEM_DESCRIPTIONItem description on the lineVARCHAR2
11PO_HEADER_IDThe matched purchase orderNUMBER
12PO_LINE_IDThe matched PO lineNUMBER
13PO_LINE_LOCATION_IDThe matched PO shipment scheduleNUMBER
14PO_DISTRIBUTION_IDThe matched PO distributionNUMBER
15RCV_TRANSACTION_IDThe matched receiving transaction — the three-way-match threadNUMBER
16ACCOUNTING_DATEThe accounting date — the primary analysis dateDATE
Filter date
17DISCARDED_FLAGY when the line was discarded — exclude from spendVARCHAR2
18CANCELLED_FLAGY when the line was cancelledVARCHAR2

Field provenance: hand-curated. 2 key fields.

Boilerplate SQL

Starting point for reading AP_INVOICE_LINES_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.

Query parameters
-- ============================================================
-- Table  : AP_INVOICE_LINES_ALL — Supplier invoice lines — the R12-new layer between header and distributions, carrying line type, amount, and the purchase-order and receipt matching references
-- Purpose: Column-selected read of AP_INVOICE_LINES_ALL — auto-generated from field metadata
-- Grain  : One row per operating unit (ORG_ID) + INVOICE_ID + LINE_NUMBER
-- Caution: ITEM, TAX, FREIGHT, and MISC lines share the table — filter LINE_TYPE_LOOKUP_CODE before summing spend, and exclude discarded/cancelled lines
-- 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 "The invoice — key together with the line number; no surrogate line id exists",
  t.LINE_NUMBER AS "Line number within the invoice — part of the key",
  t.ORG_ID AS "Operating unit",
  t.LINE_TYPE_LOOKUP_CODE AS "Item, tax, freight, or miscellaneous line — a lookup code, undecoded; filter before summing spend",
  t.AMOUNT AS "Line amount",
  t.BASE_AMOUNT AS "Line amount in the ledger currency",
  t.QUANTITY_INVOICED AS "Quantity invoiced",
  t.UNIT_PRICE AS "Unit price",
  t.INVENTORY_ITEM_ID AS "The item, for item-matched lines",
  t.ITEM_DESCRIPTION AS "Item description on the line",
  t.PO_HEADER_ID AS "The matched purchase order",
  t.PO_LINE_ID AS "The matched PO line",
  t.PO_LINE_LOCATION_ID AS "The matched PO shipment schedule",
  t.PO_DISTRIBUTION_ID AS "The matched PO distribution",
  t.RCV_TRANSACTION_ID AS "The matched receiving transaction — the three-way-match thread",
  t.ACCOUNTING_DATE AS "The accounting date — the primary analysis date",
  t.DISCARDED_FLAG AS "Y when the line was discarded — exclude from spend",
  t.CANCELLED_FLAG AS "Y when the line was cancelled"
FROM <catalog>.<schema>.AP_INVOICE_LINES_ALL t
WHERE
  t.ORG_ID = <operating_unit_id>  -- operating unit (MOAC does not filter extracts)
  -- AND t.INVOICE_ID = <INVOICE_ID>
  -- AND t.LINE_NUMBER = <LINE_NUMBER>
  -- 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_ID;

8 parameters not filled: <catalog>, <schema>, <operating_unit_id>, <INVOICE_ID>, <LINE_NUMBER>, <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

  • AP_INVOICES_ALLAP_INVOICE_LINES_ALLheader line · 1:N
    ON AP_INVOICES_ALL.INVOICE_ID = AP_INVOICE_LINES_ALL.INVOICE_ID AND AP_INVOICES_ALL.ORG_ID = AP_INVOICE_LINES_ALL.ORG_ID
  • AP_INVOICE_LINES_ALLPO_HEADERS_ALLforeign key · N:1
    ON AP_INVOICE_LINES_ALL.PO_HEADER_ID = PO_HEADERS_ALL.PO_HEADER_ID AND AP_INVOICE_LINES_ALL.ORG_ID = PO_HEADERS_ALL.ORG_ID
  • AP_INVOICE_LINES_ALLPO_LINE_LOCATIONS_ALLforeign key · N:1
    ON AP_INVOICE_LINES_ALL.PO_LINE_LOCATION_ID = PO_LINE_LOCATIONS_ALL.LINE_LOCATION_ID AND AP_INVOICE_LINES_ALL.ORG_ID = PO_LINE_LOCATIONS_ALL.ORG_ID
  • AP_INVOICE_LINES_ALLRCV_TRANSACTIONSforeign key · N:1
    ON AP_INVOICE_LINES_ALL.RCV_TRANSACTION_ID = RCV_TRANSACTIONS.TRANSACTION_ID
  • AP_INVOICE_DISTRIBUTIONS_ALLAP_INVOICE_LINES_ALLforeign key · N:1
    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_ID

Browse more Financialstables →

Maintained by Summit Analytics, a supply chain analytics practice. The tools and references are free — the consulting is selective.

Part of the Summit Analytics reference library.

Work with the practice →

Not affiliated with or endorsed by Oracle. Oracle and Oracle E-Business Suite are registered trademarks of Oracle and/or its affiliates.