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
- ID and MAJOR_VERSION — the surrogate primary key (OKS_K_LINES_BH_PK) and the version discriminator that uniquely identifies each historical line record.
- CLE_ID — the contract line identifier carried over from OKC_K_LINES_BH; together with MAJOR_VERSION it forms the unique business key OKS_K_LINES_BH_U2.
- DNZ_CHR_ID — the contract header identifier linking the line to its parent contract; indexed non-uniquely with MAJOR_VERSION in OKS_K_LINES_BH_N1.
- DISCOUNT_LIST, DISCOUNT_AMOUNT, DISCOUNT_PERCENT — pricing adjustments and discount configuration for the line.
- PRICE_UOM, PROD_PRICE, SERVICE_PRICE — unit of measure and product/service price points.
- ACCT_RULE_ID — the accounting rule applied to the line.
- COMMITMENT_ID — reference to the purchasing commitment; a foreign key to PON_OFFER_COMMITMENTS.
- TRXN_EXTENSION_ID — reference to payment transaction extensions; a foreign key to IBY_FNDCPT_TX_EXTENSIONS.
- SECURITY_GROUP_ID — the multi-org security group; a foreign key to FND_SECURITY_GROUPS.
- PAYMENT_TYPE, CC_NO, CC_EXPIRY_DATE, CC_BANK_ACCT_ID, CC_AUTH_CODE — payment instrument details retained for the historical version.
- OBJECT_VERSION_NUMBER — the standard optimistic locking column used across EBS interfaces.
- Standard audit columns CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN, REQUEST_ID.
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.
-
INDEX: OKS.OKS_K_LINES_BH_U2
12.2.2
owner:OKS, object_type:INDEX, object_name:OKS_K_LINES_BH_U2, status:VALID,
-
INDEX: OKS.OKS_K_LINES_BH_U2
12.1.1
owner:OKS, object_type:INDEX, object_name:OKS_K_LINES_BH_U2, status:VALID,
-
12.2.2 DBA Data
12.2.2
-
12.2.2 DBA Data
12.2.2
-
12.1.1 DBA Data
12.1.1
-
12.1.1 DBA Data
12.1.1
-
TABLE: OKS.OKS_K_LINES_BH
12.1.1
owner:OKS, object_type:TABLE, fnd_design_data:OKS.OKS_K_LINES_BH, object_name:OKS_K_LINES_BH, status:VALID,
-
TABLE: OKS.OKS_K_LINES_BH
12.2.2
owner:OKS, object_type:TABLE, fnd_design_data:OKS.OKS_K_LINES_BH, object_name:OKS_K_LINES_BH, status:VALID,
-
eTRM - OKS Tables and Views
12.2.2
-
eTRM - OKS Tables and Views
12.1.1
description: Stores the template set information. ,