Search Results ap_invoice_lines_u1




Overview

AP.AP_INVOICE_LINES_ALL is the core Payables transaction line table in Oracle E-Business Suite Releases 12.1.1 and 12.2.2. It stores one row for every invoice line entered manually, generated automatically, or loaded through the Payables Open Interface. Each invoice header in AP_INVOICES_ALL may have one or more lines, and each line may fan out into one or more invoice distributions in AP_INVOICE_DISTRIBUTIONS_ALL. A line represents goods (direct or indirect materials), services, or associated tax, freight, and miscellaneous charges billed by a supplier, and carries the attributes needed to describe the charge consistently with the physical or electronic invoice. Documented line types include Item, Freight, Miscellaneous, Tax, Prepayment, and Withholding Tax. Prepayment lines arise from prepayment application, while Item lines may reflect a purchase order or receipt match, a price or quantity correction against a matched line, an invoice correction against a non-matched line, or a non-matched line itself.

From a Data Vault modeling perspective, the mined foreign-key structure classifies this table as satellite-leaning. That is a heuristic suggestion rather than a delivered design: the object behaves primarily as a descriptive satellite attached to an invoice hub or link, though it also carries genuine relationship semantics through its purchase order, receipt, and project references.

Key Information Stored

The table is defined in the AP schema under FND Design Data SQLAP.AP_INVOICE_LINES_ALL and contains 202 documented columns in the 12.2.2 physical schema. The declared primary key is AIL_PK, composed of INVOICE_ID and LINE_NUMBER. The unique index AP_INVOICE_LINES_U1 also covers (INVOICE_ID, LINE_NUMBER), making this composite the business-key candidate that callers such as the search term ap_invoice_lines_u1 refer to.

Common Use Cases and Queries

The table is central to invoice-line inquiry, match validation, tax reconciliation, and open-interface troubleshooting. A typical retrieval joins lines to their header and distributions:

  • Lines for one invoice: SELECT line_number, line_type_lookup_code, amount, quantity_invoiced FROM ap.ap_invoice_lines_all WHERE invoice_id = :p_invoice_id ORDER BY line_number;
  • Lines matched to a purchase order: filter on PO_LINE_LOCATION_ID and MATCH_TYPE to reconcile three-way match exceptions.
  • Receipt-matched reporting: join RCV_SHIPMENT_LINE_ID to RCV_SHIPMENT_LINES to trace the receipt behind a freight or item line.
  • Distribution auditing: join AP_INVOICE_DISTRIBUTIONS_ALL on INVOICE_ID and LINE_NUMBER to verify what was charged.
  • Tax analysis: aggregate TAX, TOTAL_REC_TAX_AMOUNT, and SUMMARY_TAX_LINE_ID for E-Business Tax reporting.
  • Line-source analysis: group by LINE_SOURCE and LINE_TYPE_LOOKUP_CODE to examine auto-generated versus manually entered volumes.
  • Interface diagnostics: inspect rows created by the Payables Open Interface when a load fails validation.

Related Objects