Search Results ap_ae_lines_all




Overview

The AP_AE_LINES_ALL table is a core accounting data structure within Oracle E-Business Suite Payables (AP) module. It serves as the detailed line-level repository for subledger accounting entries generated from payables transactions. Each record in this table represents a single accounting line (debit or credit) that, when aggregated with other lines under a common header, forms a complete accounting journal entry. This table is integral to the Subledger Accounting (SLA) architecture, capturing the detailed accounting consequences of invoices, payments, prepayments, and other payables activities before they are transferred to the General Ledger (GL). Its role is critical for maintaining a complete, auditable trail of financial events within the payables subledger.

Key Information Stored

The table stores the essential attributes that define an accounting line. The primary identifier is the AE_LINE_ID. Each line is linked to its parent journal entry via the AE_HEADER_ID, which joins to AP_AE_HEADERS_ALL. Key accounting dimensions stored include the CODE_COMBINATION_ID (the accounting flexfield), the accounted amounts (ACCOUNTED_DR, ACCOUNTED_CR), and the entered amounts (ENTERED_DR, ENTERED_CR) with their associated CURRENCY_CODE. The table also captures the source transaction details, such as the THIRD_PARTY_ID (vendor) and THIRD_PARTY_SUB_ID (vendor site), linking back to PO_VENDORS and PO_VENDOR_SITES_ALL respectively. Other critical columns include the CURRENCY_CONVERSION_TYPE and CURRENCY_CONVERSION_RATE for foreign currency transactions, and the SUBLEDGER_DOC_SEQUENCE_ID for document sequencing.

Common Use Cases and Queries

This table is central to troubleshooting accounting issues, performing reconciliations, and building custom financial reports. A common use case is investigating the detailed accounting for a specific invoice or payment. The following sample query retrieves the accounting lines for a given invoice ID by joining through the SLA distribution link tables.

  • SELECT ael.ae_line_id, ael.code_combination_id, ael.accounted_dr, ael.accounted_cr, ael.entered_dr, ael.entered_cr, ael.currency_code FROM ap_ae_lines_all ael JOIN ap_ae_headers_all aeh ON ael.ae_header_id = aeh.ae_header_id JOIN xla_events xe ON aeh.event_id = xe.event_id WHERE xe.entity_id = (SELECT entity_id FROM xla_transaction_entities WHERE source_id_int_1 = :p_invoice_id AND application_id = 200 AND entity_code = 'AP_INVOICES') ORDER BY ael.ae_line_num;
  • Another critical reporting use case is analyzing accounted amounts by natural account segment or vendor, which requires joining to GL_CODE_COMBINATIONS and PO_VENDORS.

Related Objects

The AP_AE_LINES_ALL table maintains defined foreign key relationships with several fundamental EBS tables, as documented in the ETRM metadata. These relationships are essential for accurate joins in queries and reports.

  • AP_AE_HEADERS_ALL: Linked via AE_HEADER_ID. This is the primary parent relationship for every accounting line.
  • FND_CURRENCIES: Linked via CURRENCY_CODE to validate the transaction currency.
  • FND_DOCUMENT_SEQUENCES: Linked via SUBLEDGER_DOC_SEQUENCE_ID to manage accounting document numbering.
  • GL_DAILY_CONVERSION_TYPES: Linked via CURRENCY_CONVERSION_TYPE to define the rate type used for currency conversion.
  • PO_VENDORS: Linked via THIRD_PARTY_ID to identify the vendor associated with the accounting line.
  • PO_VENDOR_SITES_ALL: Linked via THIRD_PARTY_SUB_ID to identify the specific vendor site.