Search Results b_bb
Overview
OKC_ANCESTRYS_V is a public view owned by the APPS schema in Oracle E-Business Suite releases 12.1.1 and 12.2.2, registered under FND Design Data as OKC.OKC_ANCESTRYS_V and reported with a status of VALID. It belongs to the Oracle Contracts (OKC) module and exposes the ancestry relationship that records the complete hierarchical lineage of contract line items. As documented in the ETRM repository, the underlying relationship is an intersection table intended to hold the complete list of all ancestor lines for a given line. This materialized lineage allows a flat, non-recursive query to retrieve the full set of Terms and Conditions (T&C) that apply to a line, including T&C attached explicitly to that line and T&C flowing down from the parent contract and from ancestor lines. Because the view is described as a public view that may be useful for custom reporting or other data requirements, it is a supported access point for reporting and integration rather than an internal implementation object.
Underlying Base Objects
The view is defined over the base object OKC_ANCESTRYS, which is exposed through a synonym in the APPS schema. OKC_ANCESTRYS is populated by a database trigger, documented in the metadata as CREATE_ANCESTRY, that fires AFTER INSERT ON the line table (referenced generically as B) FOR EACH ROW. On each newly inserted line, the trigger inserts rows into the ancestry table (referenced as C): it copies the parent of the new line plus every ancestor of that parent, and it also inserts a self-referencing row and a contract-to-line row where the respective identifiers are not null. The view therefore presents the same parent/descendant pairs maintained by this trigger, providing a read-consistent picture of the line hierarchy for downstream SQL.
Key Columns
- ROW_ID (ROWID, length 10): the physical address of the row in the database; this is the standard Oracle row identifier and is not a business key.
- CLE_ID (NUMBER): foreign key to OKC_K_LINES_B, identifying the descendant contract line record whose ancestry is described.
- CLE_ID_ASCENDANT (NUMBER): surrogate key identifying the ancestor line for the descendant given in CLE_ID. Together, CLE_ID and CLE_ID_ASCENDANT express one edge in the complete ancestor path for a line.
The trigger logic referenced in the documentation maps these columns to a contract identifier (A_AA), a line identifier (B_BB) and a lineage target (B_BB_FOR), confirming that the ancestry table stores the ancestor/descendant pairing as well as the originating contract context.
Common Use Cases and Queries
The principal use case is resolving the total set of Terms and Conditions applicable to a contract line, distinguishing T&C explicitly attached to the line from T&C inherited through the contract or through ancestor lines. This supports forms that toggle between the explicitly attached T&C and the fully rolled-up T&C view. A representative query against the view retrieves every ancestor of a supplied line:
SELECT cle_id, cle_id_ascendant FROM apps.okc_ancestrys_v WHERE cle_id = :line_id;SELECT a.cle_id_ascendant FROM apps.okc_ancestrys_v a WHERE a.cle_id = :line_id;— used as an inline set in a join to the T&C relationship tables to expand rolled-down terms.
Because the view avoids recursive tree walking, it is well suited to reporting extracts, BI Publisher data sets, and custom concurrent programs that must aggregate inherited contract terms across a line hierarchy.
-
VIEW: APPS.OKC_ANCESTRYS_V
12.1.1
owner:APPS, object_type:VIEW, fnd_design_data:OKC.OKC_ANCESTRYS_V, object_name:OKC_ANCESTRYS_V, status:VALID,
-
VIEW: APPS.OKC_ANCESTRYS_V
12.2.2
owner:APPS, object_type:VIEW, fnd_design_data:OKC.OKC_ANCESTRYS_V, object_name:OKC_ANCESTRYS_V, status:VALID,
-
eTRM - OKC Tables and Views
12.1.1
description: Intersection entity between templates and rules. ,
-
eTRM - OKC Tables and Views
12.2.2
description: Intersection entity between rules and templates ,