Search Results okc_condition_lines_hv




Overview

OKC_CONDITION_LINES_HV is a history view owned by the APPS schema within the OKC – Contracts Core product module. It presents the versioned/historical representation of contract condition lines — the individual rule expressions (left operand, operator, right operand, logical connectors, and tolerances) that together form a contract's condition. As a "_HV" (history view) object, it is intended for querying historical and current versions of condition line records rather than for transactional data entry. The object is documented as VALID in Oracle EBS 12.1.1 and 12.2.2 and is exposed for reporting, integration, and diagnostic purposes. Because it joins translated description data, it delivers a user-language-ready result set, making it suitable for concurrent programs, BI Publisher reports, and custom inquiry screens that must reconstruct how condition logic read at a given version.

Underlying Base Objects

The view is defined over two documented base objects: the synonym OKC_CONDITION_LINES_BH (the history/"B" table holding version-stamped condition line rows) and the synonym OKC_CONDITION_LINES_TLH (the translation history table supplying language-specific text). Its defining query, as documented in the ETRM metadata, is:

  • SELECT ... FROM OKC_CONDITION_LINES_BH CNLB, OKC_CONDITION_LINES_TLH CNLT
  • WHERE CNLB.ID = CNLT.ID AND CNLT.LANGUAGE = USERENV('LANG') AND CNLB.MAJOR_VERSION = CNLT.MAJOR_VERSION

The join on ID and MAJOR_VERSION pairs each historical version of a condition line with its matching translated row, while USERENV('LANG') restricts the result to the session's current language. The B and TL table suffixes confirm that this view is built entirely on history and translation-history storage; no current (non-history) base table is referenced.

Key Columns

Common Use Cases and Queries

Typical uses include reconstructing condition logic for a specific contract version, auditing changes to condition operators, and feeding integration extracts with language-appropriate descriptions. Because it joins translated text automatically, no additional TL join is required.

  • All condition lines for a condition header:
    SELECT cnl_id, cnl_type, description, left_counter_id, relational_operator, right_operand
    FROM okc_condition_lines_hv
    WHERE cnh_id = :p_cnh_id
    ORDER BY sortseq;
  • A specific historical version:
    SELECT id, major_version, start_at, logical_operator, tolerance
    FROM okc_condition_lines_hv
    WHERE id = :p_line_id AND major_version = :p_version;
  • Audit of changes by date:
    SELECT id, major_version, last_updated_by, last_update_date, relational_operator
    FROM okc_condition_lines_hv
    WHERE cnh_id = :p_cnh_id
    ORDER BY last_update_date DESC;

Queries should always filter by ID or CNH_ID to avoid full history scans, and results are limited to the session language via USERENV('LANG').