Search Results okc_k_art_variables_h




Overview

OKC_K_ART_VARIABLES_H is a history table in the OKC (Contracts Core) schema of Oracle E-Business Suite, holding the "document clause variable history" for contract terms. In contract authoring, clause text is often parameterized with variables that are resolved at runtime or at merge time (for example, a party name, a monetary amount, or a date drawn from an attribute value set). This table preserves the values those variables assumed across successive document versions, keyed by contract article (CAT_ID) and major version.

As a historical record of variable state over time, the object is best understood as a satellite-style structure. ETRM's heuristic Data Vault classification, mined from the foreign-key structure, marks it as standalone; from a modeling perspective it behaves as a history/audit satellite whose parent key is CAT_ID combined with MAJOR_VERSION, rather than as a hub or link. This distinction matters when designing extraction or warehouse models: the natural grain is (CAT_ID, VARIABLE_CODE, MAJOR_VERSION), consistent with the unique index OKC_K_ART_VARIABLES_H_U1.

Key Information Stored

The documented physical schema contains 17 columns. The most significant are:

The surrogate key is not exposed as a single documented column; the business-key candidate is the composite unique index OKC_K_ART_VARIABLES_H_U1 over (CAT_ID, VARIABLE_CODE, MAJOR_VERSION). Only the CAT_ID foreign key to BEN_TCS_CAT is documented; no primary-key constraint is listed in the supplied metadata. The presence of OBJECT_VERSION_NUMBER is a strong indicator that this table is maintained by the Contracts Core PL/SQL API layer rather than by direct DML.

Common Use Cases and Queries

Typical reporting needs include reconciling the current variable values against prior versions, and auditing which values were carried into a printed or merged document. A version comparison is expressed as:

  • SELECT cat_id, variable_code, major_version, variable_value FROM okc_k_art_variables_h WHERE cat_id = :p_cat_id ORDER BY variable_code, major_version;
  • Identifying override behavior: filter on override_global_yn = 'Y' to isolate document-level values that replace global defaults.
  • Auditing by user or period, using last_updated_by and last_update_date, to trace when a clause variable was last changed.
  • Retrieving rendered content for document regeneration by selecting mr_variable_html and mr_variable_xml for a target version.

Because the table is history-oriented, queries should always constrain on CAT_ID and, where history granularity matters, on MAJOR_VERSION to avoid cross-version duplication.

Related Objects

  • BEN_TCS_CAT — joined on CAT_ID (documented FK); supplies the article/category context.
  • OKC_K_ART_VARIABLES — the current (non-history) counterpart maintained alongside this history table.
  • OKC_K_ARTICLES and OKC_K_ARTICLE_VERSIONS — provide the article and version metadata resolved by CAT_ID and MAJOR_VERSION.
  • OKC_K_HEADERS / OKC_K_LINES — the contract document and line structures that own the articles.
  • OKC_TERMS_UTIL and the Contracts Core document-generation APIs — the PL/SQL layer that populates VARIABLE_VALUE and the MR_VARIABLE columns.