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
Mixed line kinds share the table (Item/Freight/Miscellaneous/Tax/Prepayment/Withholding) — filter LINE_TYPE_LOOKUP_CODE before summing spend
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.
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.InvoiceLineExtractPVOOTBI: 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
| # | Field | Description | Type | Flags |
|---|---|---|---|---|
| 1 | INVOICE_ID | The invoice — half of the composite key; there is no line surrogate id | NUMBER | Key |
| 2 | LINE_NUMBER | Line number — the other half of the composite key | NUMBER | Key |
| 3 | ORG_ID | The business unit owning the line | NUMBER | |
| 4 | LINE_TYPE_LOOKUP_CODE | Row kind — Item, Freight, Miscellaneous, Tax, Prepayment, or Withholding Tax | VARCHAR2 | INVOICE LINE TYPE |
| 5 | AMOUNT | Line amount in invoice currency | NUMBER | |
| 6 | QUANTITY_INVOICED | Quantity invoiced | NUMBER | |
| 7 | UNIT_PRICE | Price per unit | NUMBER | |
| 8 | INVENTORY_ITEM_ID | Item on the line — the documented FK pairs it with the BU column, so the shipped edge joins the item id alone | NUMBER | |
| 9 | PO_HEADER_ID | Matched purchase order | NUMBER | |
| 10 | PO_LINE_LOCATION_ID | Matched PO schedule | NUMBER | |
| 11 | PO_DISTRIBUTION_ID | Matched PO distribution | NUMBER | |
| 12 | RCV_TRANSACTION_ID | Matched receiving transaction | NUMBER | |
| 13 | ACCOUNTING_DATE | Accounting date for the line | DATE | Filter date |
| 14 | MATCH_TYPE | How the line was matched (PO, receipt, not matched) | VARCHAR2 | INVOICE LINE MATCH TYPE |
| 15 | DISCARDED_FLAG | Line discarded — distributions reversed and amount zeroed | VARCHAR2 | |
| 16 | CANCELLED_FLAG | Line cancelled | VARCHAR2 | |
| 17 | TAX_CLASSIFICATION_CODE | Tax classification of the line | VARCHAR2 |
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.
-- ============================================================
-- 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
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_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_IDON 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>'ON AP_INVOICE_LINES_ALL.PO_HEADER_ID = PO_HEADERS_ALL.PO_HEADER_IDON AP_INVOICE_LINES_ALL.PO_LINE_LOCATION_ID = PO_LINE_LOCATIONS_ALL.LINE_LOCATION_IDON AP_INVOICE_LINES_ALL.PO_DISTRIBUTION_ID = PO_DISTRIBUTIONS_ALL.PO_DISTRIBUTION_IDON AP_INVOICE_LINES_ALL.RCV_TRANSACTION_ID = RCV_TRANSACTIONS.TRANSACTION_IDON AP_INVOICE_LINES_ALL.INVENTORY_ITEM_ID = EGP_SYSTEM_ITEMS_B.INVENTORY_ITEM_ID