Skip to content
Fusion Reference

AP_INVOICE_LINES_ALL

Product: APtransactionBU-striped (ORG_ID)

Payables invoice lines — the goods/services, freight, tax, and prepayment rows under each invoice, carrying the amount, quantity, and the PO/receipt match pointers

Grain note

Mixed line kinds share the table (Item/Freight/Miscellaneous/Tax/Prepayment/Withholding) — filter LINE_TYPE_LOOKUP_CODE before summing spend

Notes

The composite key is INVOICE_ID + LINE_NUMBER — there is no line surrogate id. The PO/receipt match rides four pointer columns down to the PO distribution and receiving transaction. The item FK is documented against the item master but pairs the item id with ORG_ID — the BU, which cannot equal an inventory org — so the shipped item edge joins the item id alone (N:M; disclosed).

What the badges mean
master
Data class: what the table holds — master data, transaction documents, control/configuration, interface/staging, or a documented 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.

Extract access

The delivered surfaces that reach this table — the BICC extract data store (PVO) for bulk extraction and the OTBI subject areas for real-time queries. There is no SQL path to the SaaS database.

  • FscmTopModelAM.FinExtractAM.ApBiccExtractAM.InvoiceLineExtractPVO
    OTBI: Payables Invoices - Transactions Real Time

    Invoice Lines data store — composite key ApInvoiceLinesAllInvoiceId + ApInvoiceLinesAllLineNumber, mirroring the table's composite PK.

    Oracle data-store documentation →

Fields

17 fields · 2 key

Table fields: position, field name, description, data type, and flags. 17 fields.
#FieldDescriptionTypeFlags
1INVOICE_IDThe invoice — half of the composite key; there is no line surrogate idNUMBER
Key
2LINE_NUMBERLine number — the other half of the composite keyNUMBER
Key
3ORG_IDThe business unit owning the lineNUMBER
4LINE_TYPE_LOOKUP_CODERow kind — Item, Freight, Miscellaneous, Tax, Prepayment, or Withholding TaxVARCHAR2
INVOICE LINE TYPE
5AMOUNTLine amount in invoice currencyNUMBER
6QUANTITY_INVOICEDQuantity invoicedNUMBER
7UNIT_PRICEPrice per unitNUMBER
8INVENTORY_ITEM_IDItem on the line — the documented FK pairs it with the BU column, so the shipped edge joins the item id aloneNUMBER
9PO_HEADER_IDMatched purchase orderNUMBER
10PO_LINE_LOCATION_IDMatched PO scheduleNUMBER
11PO_DISTRIBUTION_IDMatched PO distributionNUMBER
12RCV_TRANSACTION_IDMatched receiving transactionNUMBER
13ACCOUNTING_DATEAccounting date for the lineDATE
Filter date
14MATCH_TYPEHow the line was matched (PO, receipt, not matched)VARCHAR2
INVOICE LINE MATCH TYPE
15DISCARDED_FLAGLine discarded — distributions reversed and amount zeroedVARCHAR2
16CANCELLED_FLAGLine cancelledVARCHAR2
17TAX_CLASSIFICATION_CODETax classification of the lineVARCHAR2

Field provenance: hand-curated. 2 key fields.

Boilerplate SQL

Starting point for reading the BICC-landed copy of AP_INVOICE_LINES_ALLon Databricks — real DATE columns need no conversion, and the org anchor and the LAST_UPDATE_DATE watermark (the column incremental BICC extracts key on) 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 — Payables invoice lines — the goods/services, freight, tax, and prepayment rows under each invoice, carrying the amount, quantity, and the PO/receipt match pointers
-- Purpose: Column-selected read of AP_INVOICE_LINES_ALL — auto-generated from field metadata
-- Grain  : One row per business unit (ORG_ID) + INVOICE_ID + LINE_NUMBER
-- Caution: Mixed line kinds share the table (Item/Freight/Miscellaneous/Tax/Prepayment/Withholding) — filter LINE_TYPE_LOOKUP_CODE before summing spend
-- Notes  : Auto-generated skeleton for Oracle Fusion Cloud data landed in your lakehouse by a BICC extract — there is no SQL path to the SaaS database. Column names follow Oracle's table documentation — if your landed data still carries PVO attribute headers, map names first; see quirks #pvo-drift. 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 — half of the composite key; there is no line surrogate id",
  t.LINE_NUMBER AS "Line number — the other half of the composite key",
  t.ORG_ID AS "The business unit owning the line",
  t.LINE_TYPE_LOOKUP_CODE AS "Row kind — Item, Freight, Miscellaneous, Tax, Prepayment, or Withholding Tax",  -- decode t.LINE_TYPE_LOOKUP_CODE via FND_LOOKUP_VALUES (LOOKUP_TYPE = 'INVOICE LINE TYPE', LANGUAGE-filtered)
  t.AMOUNT AS "Line amount in invoice currency",
  t.QUANTITY_INVOICED AS "Quantity invoiced",
  t.UNIT_PRICE AS "Price per unit",
  t.INVENTORY_ITEM_ID AS "Item on the line — the documented FK pairs it with the BU column, so the shipped edge joins the item id alone",
  t.PO_HEADER_ID AS "Matched purchase order",
  t.PO_LINE_LOCATION_ID AS "Matched PO schedule",
  t.PO_DISTRIBUTION_ID AS "Matched PO distribution",
  t.RCV_TRANSACTION_ID AS "Matched receiving transaction",
  t.ACCOUNTING_DATE AS "Accounting date for the line",
  t.MATCH_TYPE AS "How the line was matched (PO, receipt, not matched)",  -- decode t.MATCH_TYPE via FND_LOOKUP_VALUES (LOOKUP_TYPE = 'INVOICE LINE MATCH TYPE', LANGUAGE-filtered)
  t.DISCARDED_FLAG AS "Line discarded — distributions reversed and amount zeroed",
  t.CANCELLED_FLAG AS "Line cancelled",
  t.TAX_CLASSIFICATION_CODE AS "Tax classification of the line"
FROM <catalog>.<schema>.AP_INVOICE_LINES_ALL t
WHERE
  t.ORG_ID = <business_unit_id>  -- business unit — Fusion _ALL means BU, not the EBS operating unit; see quirks guide #all-means-bu
  -- 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>'  -- the column incremental BICC extracts key on
ORDER BY t.INVOICE_ID;

8 parameters not filled: <catalog>, <schema>, <business_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_DISTRIBUTIONS_ALLAP_INVOICE_LINES_ALLforeign key · N:1
    ON AP_INVOICE_DISTRIBUTIONS_ALL.INVOICE_LINE_NUMBER = AP_INVOICE_LINES_ALL.LINE_NUMBER AND AP_INVOICE_DISTRIBUTIONS_ALL.INVOICE_ID = AP_INVOICE_LINES_ALL.INVOICE_ID AND AP_INVOICE_DISTRIBUTIONS_ALL.ORG_ID = AP_INVOICE_LINES_ALL.ORG_ID
  • AP_INVOICE_LINES_ALLFND_LOOKUP_VALUESFND lookup decode · N:1
    ON AP_INVOICE_LINES_ALL.LINE_TYPE_LOOKUP_CODE = FND_LOOKUP_VALUES.LOOKUP_CODE AND FND_LOOKUP_VALUES.LOOKUP_TYPE = 'INVOICE LINE TYPE' AND FND_LOOKUP_VALUES.LANGUAGE = '<language>'
  • AP_INVOICE_LINES_ALLPO_HEADERS_ALLforeign key · N:1
    ON AP_INVOICE_LINES_ALL.PO_HEADER_ID = PO_HEADERS_ALL.PO_HEADER_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
  • AP_INVOICE_LINES_ALLPO_DISTRIBUTIONS_ALLforeign key · N:1
    ON AP_INVOICE_LINES_ALL.PO_DISTRIBUTION_ID = PO_DISTRIBUTIONS_ALL.PO_DISTRIBUTION_ID
  • AP_INVOICE_LINES_ALLRCV_TRANSACTIONSforeign key · N:1
    ON AP_INVOICE_LINES_ALL.RCV_TRANSACTION_ID = RCV_TRANSACTIONS.TRANSACTION_ID
  • AP_INVOICE_LINES_ALLEGP_SYSTEM_ITEMS_Bforeign key · N:M
    ON AP_INVOICE_LINES_ALL.INVENTORY_ITEM_ID = EGP_SYSTEM_ITEMS_B.INVENTORY_ITEM_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 Fusion Cloud Applications are registered trademarks of Oracle and/or its affiliates.