Search Results oks_k_lines_bh_u2




Overview

OKS.OKS_K_LINES_BH is a Service Contracts (OKS) history table that stores versioned line-level detail for Oracle E-Business Suite service contracts. Every time a contract is versioned through the Actions → Create New Version option in the Service Contracts Authoring form, the contract line rows previously held in OKS_K_LINES_B are moved into OKS_K_LINES_BH. The table therefore preserves a complete historical snapshot of contract lines, with each version identified by the MAJOR_VERSION column. Header-level versioning is handled separately by OKS_K_HEADERS_BH, which receives rows from OKS_K_HEADERS_B.

OKS_K_LINES_BH is a child of OKC_K_LINES_BH. There is a one-to-one relationship between the two tables: columns CLE_ID + MAJOR_VERSION of OKS_K_LINES_BH map to columns ID + MAJOR_VERSION of OKC_K_LINES_BH. The primary key is OKS_K_LINES_BH_PK (ID, MAJOR_VERSION). Under the supplied heuristic Data Vault classification, this object is treated as standalone; from a modeling perspective it behaves most naturally as a satellite, capturing the descriptive, time-versioned attributes of the contract line hub (ID, MAJOR_VERSION) rather than modeling a hub or link itself. The documented physical schema in ETRM 12.2.2 lists 99 columns, and the table resides in tablespace APPS_TS_TX_DATA with PCT Free 10.

Key Information Stored

Common Use Cases and Queries

Typical usage centers on version comparison, audit reporting, and reconciliation between the current and historical contract line data. A common pattern selects a historical version for a specific line:

  • Retrieve all versions of a contract's lines: SELECT ID, MAJOR_VERSION, CLE_ID, DNZ_CHR_ID, PROD_PRICE FROM OKS_K_LINES_BH WHERE DNZ_CHR_ID = :contract_id ORDER BY MAJOR_VERSION;
  • Join history to the current OKC line hub to compare attributes: SELECT bh.*, b.* FROM OKS_K_LINES_BH bh, OKC_K_LINES_BH kbh WHERE bh.CLE_ID = kbh.ID AND bh.MAJOR_VERSION = kbh.MAJOR_VERSION AND bh.DNZ_CHR_ID = :contract_id;
  • Identify the most recent version: SELECT MAX(MAJOR_VERSION) FROM OKS_K_LINES_BH WHERE ID = :line_id;
  • Report pricing and discount history over versions for audit or revenue analysis.
  • Reconcile commitment references (COMMITMENT_ID) and payment transaction extensions against their source tables for auditing.

These queries rely on the unique indexes OKS_K_LINES_BH_U1 (ID, MAJOR_VERSION) and OKS_K_LINES_BH_U2 (CLE_ID, MAJOR_VERSION), so filtering on those column pairs benefits performance; index OKS_K_LINES_BH_N1 (DNZ_CHR_ID, MAJOR_VERSION) supports header-scoped retrieval.

Related Objects

  • OKC_K_LINES_BH — parent history table for contract lines; joined on OKS_K_LINES_BH.CLE_ID = OKC_K_LINES_BH.ID and matching MAJOR_VERSION.
  • OKS_K_LINES_B — current (non-versioned) source of the line rows moved into this history table upon versioning.
  • OKS_K_HEADERS_BH — header-level history created in the same versioning operation.
  • PON_OFFER_COMMITMENTS — referenced by OKS_K_LINES_BH.COMMITMENT_ID.
  • IBY_FNDCPT_TX_EXTENSIONS — referenced by OKS_K_LINES_BH.TRXN_EXTENSION_ID.
  • FND_SECURITY_GROUPS — referenced by OKS_K_LINES_BH.SECURITY_GROUP_ID.
  • CS_INCIDENT_SEVERITIES_B — referenced by OKS_K_LINES_BH.INCIDENT_SEVERITY_ID.