Search Results global_value_id




Overview

OKC_TERMS_GLOBAL_VAR_V is an APPS-owned database view within the Oracle E-Business Suite Contracts Core (OKC) module. It exposes global and contract-article level variable definitions used by Oracle Contracts terms and clauses, consolidating rows from the business variables repository and the contract article variable assignments. The view joins variable metadata (name, code, datatype, type) to the actual variable values stored against contract articles, so that integration and reporting layers can resolve which global variables apply to a given document, and what value each variable carries. It is a read-only reporting surface, defined entirely as a SQL SELECT statement with no DML capability, and it is typically consumed by concurrent programs, OAF pages, and custom extracts rather than maintained directly.

The view is especially relevant when a consumer searches on global_value_id, since it projects the internal identifier of the value stored in the contract article variable table. This distinguishes it from sibling views that present only the descriptive metadata without the assigned value.

Underlying Base Objects

The ETRM 12.2.2 metadata documents the view as referencing three objects:

  • OKC_BUS_VARIABLES_VL (VIEW) — the business variables definition repository, aliased S. Supplies variable name, description, code, type, datatype, source flags and the CLM source column.
  • OKC_K_ARTICLES_B (SYNONYM) — the contract articles base table, aliased K. Supplies the document type, document identifier, and the amendment operation state used to filter deleted rows.
  • OKC_K_ART_VARIABLES (SYNONYM) — the contract article variable assignment table, aliased V. Supplies the attribute value set, the global variable value, and the global value identifier.

The join condition is K.ID = V.CAT_ID plus V.VARIABLE_CODE = S.VARIABLE_CODE, with filters restricting variables to user-defined (VARIABLE_TYPE = 'U') and manually sourced (VARIABLE_SOURCE = 'M') entries, and excluding rows whose amendment operation code equals DELETED.

Key Columns

  • VARIABLE_NAME / VARIABLE_DESCRIPTION — user-facing label and description of the variable.
  • VARIABLE_CODE — the unique programmatic code used to link variables to contract clauses.
  • VARIABLE_TYPE — classification of the variable (user-defined values are projected by this view).
  • ATTRIBUTE_VALUE_SET_ID — identifies the value set used to validate or source permissible values.
  • VARIABLE_DATATYPE — the declared datatype for the variable value.
  • EXTERNAL_YN — indicates whether the variable is externally visible or sourced.
  • DOCUMENT_TYPE / DOCUMENT_ID — identifies the contract document the variable belongs to.
  • GLOBAL_VALUE — the stored global variable value (mapped from GLOBAL_VARIABLE_VALUE).
  • GLOBAL_VALUE_ID — the primary key of the stored value, useful for traceability and joins back to OKC_K_ART_VARIABLES.
  • CLM_SOURCE — identifies the source system or mechanism that populates the variable.

Common Use Cases and Queries

A frequent requirement is to list all global variables and their values for a specific contract document, or to retrieve values by GLOBAL_VALUE_ID for downstream reconciliation:

  • SELECT variable_name, variable_code, global_value, global_value_id FROM okc_terms_global_var_v WHERE document_id = :doc_id;
  • SELECT * FROM okc_terms_global_var_v WHERE global_value_id = :gvid;
  • SELECT document_type, document_id, variable_code, global_value FROM okc_terms_global_var_v WHERE variable_code = :code;

These queries are commonly embedded in contract terms extracts, clause generation programs, and integration interfaces that must resolve variable values at document level. Because the view filters out deleted amendment rows and null-value duplicates, callers can rely on it to return the currently effective global variable value per contract article without additional amendment handling.