Results for “okl_ap_dist_uv”

28 results




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

OKL_AP_DIST_UV is a UNION ALL view owned by the APPS schema in Oracle E-Business Suite, defined within the OKL – Lease and Finance Management product family. It consolidates Payables accounting distribution lines that are relevant to lease accounting so that lease-related subledger entries can be reported and reconciled from a single, presentation-ready source. The view normalizes data from the Payables accounting engine (AP_ACCOUNTING_EVENTS, AP_AE_HEADERS, and AP_AE_LINES) into a uniform column layout covering the accounting line identity, the accounting flexfield combination, the debit/credit indicator, the amount, and the accounting date. The reference to AP_AE_LINES is significant: users searching for "ap_ae_lines" arrive here because this view is the OKL-specific projection of the Payables accounting entry lines. It is documented as VALID in ETRM for 12.2.2 and applies equally to 12.1.1, where the same Payables accounting schema and OKL accounting utility package are present.

Underlying Base Objects

The documented base objects are AP_ACCOUNTING_EVENTS, AP_AE_HEADERS, AP_AE_LINES, AP_CHECKS, AP_INVOICES, OKL_SYS_ACCT_OPTS (all referenced as synonyms), and the OKL_ACCOUNTING_UTIL package. The first UNION ALL branch joins AP_INVOICES to AP_ACCOUNTING_EVENTS on SOURCE_ID, restricts the event to SOURCE_TABLE = 'AP_INVOICES', links AP_ACCOUNTING_EVENTS to AP_AE_HEADERS via ACCOUNTING_EVENT_ID, joins AP_AE_HEADERS to OKL_SYS_ACCT_OPTS on SET_OF_BOOKS_ID to constrain the ledger context, and finally joins AP_AE_HEADERS to AP_AE_LINES on AE_HEADER_ID. The second branch returns additional distributions (referenced as APD) with the same output shape, and the structure implies a parallel path through AP_CHECKS for payment-related entries. OKL_ACCOUNTING_UTIL supplies the concatenated segment string and description (GET_CONCAT_SEGMENTS, GET_CONCATE_DESC) and lookup meaning translations (GET_LOOKUP_MEANING). OKL_SYS_ACCT_OPTS therefore acts as the lease accounting system options filter that scopes results to the applicable set of books.

Key Columns

  • ID — the AE_LINE_ID from AP_AE_LINES, uniquely identifying the accounting distribution line.
  • AE_LINE_TYPE / AE_LINE_TYPE_MEANING — the line type code and its translated lookup meaning; also reused to populate TEMPLATE_NAME.
  • CODE_COMBINATION_ID, CONCATE_SEGMENTS, CONCATE_SEGMENTS_DESC — the accounting flexfield identifier together with the concatenated segment string and its description.
  • CR_DR_FLAG / DR_CR_FLAG_MEANING — derived via DECODE on ENTERED_DR; when ENTERED_DR is null the line is flagged 'C' (credit), otherwise 'D' (debit), with the meaning translated through the DR_CR lookup.
  • AMOUNT — NVL(ENTERED_DR, ENTERED_CR), presenting the entered debit or credit value as a single signed measure.
  • ACCOUNTING_DATE — the GL accounting date from AP_ACCOUNTING_EVENTS.
  • POSTED — a constant 'Y' derived from the YES_NO lookup, indicating the distribution is treated as posted.
  • SOURCE_ID, SOURCE_TABLE, INVOICE_ID, CHECK_ID — the source invoice identifier, the literal 'AP_INVOICES' source table, the character-converted invoice ID, and a CHECK_ID placeholder of -1.

Common Use Cases and Queries

Typical scenarios include reconciling lease-related Payables distributions to the general ledger, auditing debit/credit balances by account, and driving lease accounting reports that require a joined, translated presentation of AP_AE_LINES without reproducing the underlying joins. The view is read-only and intended for reporting and integration rather than transactional DML.

  • Distributions for a specific invoice: SELECT id, ae_line_type, concate_segments, cr_dr_flag, amount, accounting_date FROM okl_ap_dist_uv WHERE invoice_id = :p_invoice_id;
  • Account balances by period: SELECT concate_segments, cr_dr_flag, SUM(amount) FROM okl_ap_dist_uv WHERE accounting_date BETWEEN :p_from AND :p_to GROUP BY concate_segments, cr_dr_flag;
  • Full listing with meanings: SELECT id, ae_line_type_meaning, concate_segments_desc, dr_cr_flag_meaning, amount FROM okl_ap_dist_uv ORDER BY accounting_date, id;

Because the view filters through OKL_SYS_ACCT_OPTS on SET_OF_BOOKS_ID, results are naturally scoped to the lease accounting ledger configuration in effect at query time.