Search Results ar_document_lines_v




Overview

AR_DOCUMENT_LINES_V is a Receivables (AR) view owned by the APPS schema in Oracle E-Business Suite releases 12.1.1 and 12.2.2. It exposes line-level detail for documents generated through Oracle Receivables, joining transaction header, transaction line, and payment schedule information into a single reporting structure. The view is primarily associated with the ETRM (Electronic Tax Reporting and Management) document-generation and reporting flow, where inbound and outbound fiscal document lines must be presented with tax, pricing, quantity, and descriptive attributes aligned to statutory reporting requirements.

Unlike the base Receivables tables, this view restricts output to transactions linked to an external document identifier. Because it combines header-level attributes (including the full DFF attribute set and currency), line-level pricing and quantity data, and payment schedule amounts, AR_DOCUMENT_LINES_V serves as a convenient flattened source for tax reporting extracts, document printing, and downstream integration interfaces that require one row per invoice line with its associated tax amounts precomputed.

Underlying Base Objects

The documented base objects referenced by the view are:

  • RA_CUSTOMER_TRX (SYNONYM) — transaction header providing purchase order reference, currency, DFF attributes, and the document linkage columns.
  • RA_CUSTOMER_TRX_LINES (SYNONYM) — transaction lines supplying line number, line type, description, unit selling price, quantity, UOM, inventory item, extended amount, tax rate, and audit columns.
  • AR_PAYMENT_SCHEDULES (SYNONYM) — payment schedule rows supplying amount due original and discount original amounts.
  • ARP_TRX_LINE_UTIL (PACKAGE) — a PL/SQL package invoked within the view text to compute sales tax and VAT amounts per transaction line.

The join predicates link RA_CUSTOMER_TRX.CUSTOMER_TRX_ID to RA_CUSTOMER_TRX_LINES.CUSTOMER_TRX_ID and to AR_PAYMENT_SCHEDULES.CUSTOMER_TRX_ID. Critically, the view filters on NVL(TRX.PAYMENT_TRXN_EXTENSION_ID, 0) <> 0, meaning only transactions associated with an external document/payment transaction extension are returned. This constraint ties the view's purpose directly to document-centric reporting rather than general invoice inquiry.

Key Columns

Common Use Cases and Queries

Typical scenarios include fiscal document and tax extract generation, reconciliation of document lines against payment schedules, and feeding external tax reporting engines. A representative query for line-level tax reporting follows:

  • SELECT doc_unique_ref, po_number, line_number, line_type, quantity, unit_price, extended_amount, discount_amount, sales_tax_amount, vat_tax_amount, tax_rate, tax_code, invoice_currency_code FROM ar_document_lines_v WHERE doc_unique_ref = :p_payment_schedule_id ORDER BY line_number;
  • SELECT po_number, SUM(line_gross_amount), SUM(sales_tax_amount), SUM(vat_tax_amount) FROM ar_document_lines_v GROUP BY po_number;

Because tax amounts are computed through ARP_TRX_LINE_UTIL during execution, queries returning large row sets should account for the additional processing cost of per-line tax derivation. Filtering by DOC_UNIQUE_REF or PO_NUMBER generally yields the best performance and aligns with the view's document-oriented design.