Search Results summary_amend_operation_code




Overview

OKC_SECTIONS_HV is a view owned by the APPS schema in Oracle EBS Contracts Core (OKC). It exposes the historical and versioned section records that make up the structure of contract documents, providing a consolidated, read-only projection of the section history table OKC_SECTIONS_BH. The "_HV" suffix identifies it as a history view that carries the full set of versioned rows, including superseded versions, rather than only the currently effective section. This makes it the appropriate access point whenever an application, report, or integration must reconstruct how a contract's sections evolved across amendments.

In Oracle EBS 12.1.1 and 12.2.2 the object is registered as a VALID view under the Contracts Core product. Its role is largely informational and integration-oriented: it supplies section-level header data such as labels, headings, sequence, document type, and amendment operation codes, together with the descriptive and audit columns needed for auditing and downstream reporting. Because it is a view rather than a table, no DML should be issued against it; consumers read from it while the underlying base table remains the single source of truth managed by the Contracts application.

Underlying Base Objects

The documented metadata for ETRM 12.2.2 identifies a single referenced base object: OKC_SECTIONS_BH, which is accessed through a synonym. The view text confirms this relationship directly, selecting all of its columns from OKC_SECTIONS_BH and aliasing that table as SCNH. Consequently OKC_SECTIONS_HV is a thin projection: it adds no joins, no filters, and no calculated columns of its own beyond a literal NULL expression aliased as SWFT_FLAG. Column names and datatypes mirror those of the base table.

The "_BH" naming convention on the base object denotes the "B" (base) and "H" (history) table pair used extensively throughout OKC. These pairs separate the current definition of a section from its versioned history, and the history table retains one row per section version keyed in part by MAJOR_VERSION. The view therefore inherits the versioning characteristics of OKC_SECTIONS_BH and presents every stored version without additional qualification.

Key Columns

Common Use Cases and Queries

Typical uses include reconstructing the section layout of a contract at a specific version, auditing amendment history, and correlating sections with originating external records through the ORIG_SYSTEM_REFERENCE columns. The view supports reporting on print-eligible sections via PRINT_YN and on descriptive text through DESCRIPTION.

Retrieve all versions of the sections for a contract:

SELECT id, major_version, section_sequence, label, heading
FROM   apps.okc_sections_hv
WHERE  chr_id = :p_chr_id
ORDER  BY major_version, section_sequence;

Locate sections by their originating system reference, the scenario most closely tied to the search term:

SELECT id, chr_id, major_version, scn_code,
       orig_system_reference_code,
       orig_system_reference_id1,
       orig_system_reference_id2
FROM   apps.okc_sections_hv
WHERE  orig_system_reference_id2 = :p_ref_id2;

Report sections eligible for printing on a given document:

SELECT document_id, document_type, section_sequence, heading
FROM   apps.okc_sections_hv
WHERE  print_yn = 'Y'
AND    document_type = :p_doc_type
ORDER  BY document_id, section_sequence;