Search Results oks_k_lines_hv




Overview

OKS_K_LINES_HV is a seed-data view owned by the APPS schema in Oracle E-Business Suite, belonging to the OKS (Service Contracts) product family. Its ETRM description is Service Contracts Line Attributes History. The view exposes the historical, versioned attributes of service contract lines — the commercial, billing, pricing, tax, and usage-related terms attached to a contract line at a given major version. The "HV" suffix follows the Oracle EBS convention for a history view, distinguishing it from the corresponding base (_B) and translation (_TL) tables that make up the Service Contracts line entity stack.

The view is read-only in practice. It presents one row per historical line record, identified by row identifier and internal ID, with the major version column carrying the versioning semantics. Because it is defined over the history tables rather than the current-version table, it is the appropriate source for reporting on prior versions of a contract line, audit comparisons, price-change analysis, and integration extracts that must reflect the terms as they existed at a specific version.

Underlying Base Objects

ETRM documents two referenced base objects, both exposed to APPS through synonyms:

  • OKS_K_LINES_BH — the line attributes history base table. The select list is drawn almost entirely from its alias KLH, supplying the line identity (ROWID, ID, MAJOR_VERSION), commercial terms, pricing and usage attributes, and tax attributes.
  • OKS_K_LINES_TLH — the corresponding translations/attributes history table, used within the OKS line entity family to complement the base history records.

The view therefore sits directly over the historical layer of the K (contract) lines entity, rather than over the current-version table. Because it is a view and not a table, no storage is allocated to it; it inherits the read consistency and privileges of the underlying synonyms and ultimately of the APPS-owned base tables. In 12.1.1 and 12.2.2 the object is reported with Status VALID, and its definition is unchanged across the two releases at the text level documented by ETRM.

Key Columns

Common Use Cases and Queries

Typical uses include version-over-version price comparison, reconstructing the terms in force when an invoice or usage line was rated, and populating audit or data-warehouse extracts that cannot rely on the current-version table.

SELECT id, major_version, cle_id, prod_price, service_price,
       tax_code, tax_amount, price_uom
FROM   apps.oks_k_lines_hv
WHERE  cle_id = :p_cle_id
ORDER  BY major_version;
SELECT cle_id,
       MAX(DECODE(major_version, :v1, service_price)) AS price_v1,
       MAX(DECODE(major_version, :v2, service_price)) AS price_v2
FROM   apps.oks_k_lines_hv
WHERE  cle_id = :p_cle_id
GROUP  BY cle_id;

Queries should filter on ID, CLE_ID, or MAJOR_VERSION, since the view returns the full history and is not partitioned as a report would require. All access is through APPS synonyms, so callers must be granted execute on the view or operate as APPS.