Search Results okl_cs_payment_summary_uv




Overview

OKL_CS_PAYMENT_SUMMARY_UV is a read-only database view owned by the APPS schema in Oracle E-Business Suite Release 12.1.1 and 12.2.2. It is delivered as part of the OKL – Leasing and Finance Management module, which is the Oracle ETRM (Enterprise Taxation and Revenue Management) predecessor stack used for lease and finance contract processing. The view consolidates payment stream information associated with lease and finance contracts into a single result set, presenting the contract number, stream type, line context, status, currency, and a computed monetary amount for each billable stream.

Because the object is a view rather than a table, it holds no persistent data. Its principal role is reporting and integration: it exposes a normalized, denormalized-friendly slice of the payment schedule so that concurrent programs, Oracle Reports, BI Publisher templates, and external interfaces can retrieve stream amounts without reconstructing the underlying joins against OKL_STREAMS, OKC_K_HEADERS_B, and the stream type setup tables. The view is also useful as a validation source for reconciliation routines and for ad hoc queries executed by finance and lease administration users.

Underlying Base Objects

The documented metadata lists the following referenced base objects: FND_GLOBAL (package), FND_LOOKUPS (view), OKC_K_HEADERS_B (synonym to the contract headers table), OKC_K_LINES_V (view), OKC_LINE_STYLES_V (view), OKL_CS_LC_CONTRACT_PVT (package), OKL_STREAMS (synonym), OKL_STRM_TYPE_B (synonym), and OKL_STRM_TYPE_TL (synonym).

The view text is a UNION of two symmetric SELECT statements. The first branch returns contract-level streams where STM.KLE_ID IS NULL, meaning the stream is not tied to a specific contract line. The second branch handles line-attached streams (STM.KLE_ID populated) and joins OKC_K_LINES_V and OKC_LINE_STYLES_V to derive the asset number and line type. Both branches filter on STM.PURPOSE_CODE IS NULL, STYB.BILLABLE_YN = 'Y', the current session language via USERENV('LANG'), and the lookup type OKL_STREAM_ACTIVITY. The monetary figure in both branches is produced by OKL_CS_LC_CONTRACT_PVT.GET_TOTAL_STREAM_AMOUNT, a PL/SQL function supplied with the contract ID, the optional line ID, and the stream type ID.

Key Columns

  • STM_ID – Primary identifier of the underlying OKL_STREAMS row; unique within the stream record and useful for drill-down joins back to the base table.
  • KHR_ID – Contract header identifier, the foreign key to OKC_K_HEADERS_B. Serves as the primary grouping column for contract-level reporting.
  • CONTRACT_NUMBER – Human-readable contract number sourced from OKC_K_HEADERS_B.
  • STREAM_TYPE and STY_ID – Descriptive name and identifier of the stream type, taken from OKL_STRM_TYPE_TL and OKL_STRM_TYPE_B respectively. Only billable stream types are returned.
  • ASSET_NUMBER – Derived for line-attached streams via DECODE on the line type code; populated for FREE_FORM1 and LINK_SERV_ASSET lines, otherwise NULL.
  • KLE_ID – Contract line identifier. NULL indicates a contract-level stream; non-NULL indicates a line-level stream.
  • LINE_TYPE and LINE_TYPE_CODE – Line style name and code from OKC_LINE_STYLES_V. The second UNION branch restricts results to FREE_FORM1, FEE, SOLD_SERVICE, LINK_SERV_ASSET, and INSURANCE line types.
  • STATUS_CODE and STATUS – Machine code (STM.SAY_CODE) and translated meaning (FND_LOOKUPS.MEANING) for the stream activity status.
  • AMOUNT – Computed total stream amount returned by the contract private package function.
  • CURRENCY_CODE – Currency of the contract, sourced from OKC_K_HEADERS_B.

Common Use Cases and Queries

Typical uses include contract payment schedule reports, billing reconciliation, and integration extracts that feed downstream general ledger or treasury systems. A common query retrieves all streams for a specific contract:

  • SELECT contract_number, stream_type, line_type, status, amount, currency_code FROM okl_cs_payment_summary_uv WHERE contract_number = :p_contract_number ORDER BY stream_type, line_type;

To aggregate billing exposure by contract and stream type:

  • SELECT contract_number, stream_type, SUM(amount) total_amount FROM okl_cs_payment_summary_uv GROUP BY contract_number, stream_type ORDER BY contract_number;

Because AMOUNT is populated through a PL/SQL function, queries against large populations can be expensive; filtering by KHR_ID or CONTRACT_NUMBER first is recommended. The view must not be used for DML, and any extension should be implemented through a custom view layered on top rather than modification of the seeded definition.