Search Results activity_code




Overview

OKL_CONTRACT_STREAMS_UV is a user-facing (UV) view owned by the APPS schema within the Oracle E-Business Suite Leasing and Finance Management module (OKL). Its purpose is to present contract-level stream data in a decoded, report-ready form. A "stream" in OKL represents a scheduled monetary movement or billing line associated with a contract, generated from a stream type definition and expanded into dated stream elements. The view consolidates stream headers, stream type definitions, translated stream type names, stream element amounts and dates, and the parent contract header into a single denormalized result set.

The "_UV" suffix indicates the object is intended for end-user query and reporting consumption rather than for direct application DML. It joins base and translation tables and applies lookup decoding through the OKL_ACCOUNTING_UTIL package, so that raw code values are surfaced alongside their human-readable meanings. This makes the view suitable for custom reports, Oracle Reports/BI Publisher data sources, and integration extracts where readable stream activity data is required without reimplementing OKL lookup logic.

Underlying Base Objects

The documented metadata for release 12.2.2 identifies the following referenced objects:

  • OKC_K_HEADERS_B (SYNONYM) — the contract header base table; joined on CHRB.ID = STMB.KHR_ID, anchoring each stream to its contract.
  • OKL_STREAMS (SYNONYM) — the stream header table (STMB), supplying KHR_ID, SAY_CODE, TRANSACTION_NUMBER, PURPOSE_CODE and the stream type reference.
  • OKL_STRM_TYPE_B (SYNONYM) — the stream type base table (STYB), providing stream type purpose and the primary key used in the translation join.
  • OKL_STRM_TYPE_TL (SYNONYM) — the stream type translation table (STYT), filtered by USERENV('LANG') to return the name and short description in the session language.
  • OKL_STRM_ELEMENTS (SYNONYM) — the stream element table (SELB), supplying dated amounts via SELB.STM_ID = STMB.ID.
  • OKL_ACCOUNTING_UTIL (PACKAGE) — invoked through GET_LOOKUP_MEANING to translate OKL lookup codes into descriptions.

A defining filter, STMB.KLE_ID IS NULL, restricts the output to contract-level streams, excluding streams attached to lease-level entities.

Key Columns

  • KHR_ID — contract header identifier linking the stream to the contract.
  • NAME and SHORT_DESCRIPTION — stream type name and abbreviated description from the translated type table.
  • STREAM_TYPE_PURPOSE_CODE / STREAM_TYPE_PURPOSE — the coded and decoded stream type purpose (OKL_STREAM_TYPE_PURPOSE lookup).
  • STREAM_ELEMENT_DATE and AMOUNT — the scheduled date and monetary value of each stream element.
  • ACTIVITY_CODE — sourced from STMB.SAY_CODE; this is the column returned when querying for activity_code. It holds the coded stream activity against the OKL_STREAM_ACTIVITY lookup.
  • ACTIVITY — the decoded meaning of ACTIVITY_CODE via GET_LOOKUP_MEANING('OKL_STREAM_ACTIVITY', STMB.SAY_CODE).
  • TRANSACTION_NUMBER — originating transaction reference for the stream.
  • PURPOSE_CODE / PURPOSE — coded and decoded stream purpose (OKL_STRM_G_PURPOSE lookup).
  • ID — stream type identifier from OKL_STRM_TYPE_B.

Common Use Cases and Queries

Typical uses include contract stream reporting, reconciliation of scheduled amounts against contract terms, and integration extracts that must carry both codes and descriptions. Because ACTIVITY_CODE is a frequently searched column, it is commonly used to group or filter streams by activity classification.

Sample query listing streams with activity details for a contract:

SELECT khr_id, name, stream_type_purpose, stream_element_date,
       amount, activity_code, activity, transaction_number, purpose
  FROM apps.okl_contract_streams_uv
 WHERE khr_id = :p_khr_id
 ORDER BY stream_element_date;

Sample query filtered on activity code:

SELECT khr_id, activity_code, activity,
       SUM(amount) total_amount
  FROM apps.okl_contract_streams_uv
 WHERE activity_code = :p_activity_code
 GROUP BY khr_id, activity_code, activity;

Interpretation of results requires attention to the language filter and the KLE_ID exclusion: only contract-level streams are returned, and names/descriptions reflect the querying session's language.