Search Results okc_terms_var_values_v
Overview
The OKC_TERMS_VAR_VALUES_V view is a reporting and integration object owned by the APPS schema within the Oracle Contracts Core (OKC) module. It exposes the runtime values assigned to business variables that appear within contract terms and articles, joining those values back to their defining variable metadata and to the parent article/document record. In Oracle EBS 12.1.1 and 12.2.2, this view is the primary read-only interface through which developers, report authors, and integration specialists retrieve the resolved variable content stored on contract articles, rather than querying the underlying transaction tables directly.
Because contract variables can be defined once but instantiated many times across documents, the view serves as a denormalized, presentation-friendly layer. Each row represents a single variable value occurrence tied to a specific article (CAT_ID) and document, enriched with the human-readable variable name, description, and datatype from the multilingual variable definition. This makes it well suited to BI Publisher data models, custom concurrent programs, OAF/ADF integration queries, and ad hoc SQL against the APPS schema.
Underlying Base Objects
The view is defined over four documented base objects, all referenced through APPS synonyms:
- OKC_K_ART_VARIABLES (aliased VAR) — the transaction table holding the actual variable value rows attached to contract articles; supplies ROWID, CAT_ID, VARIABLE_CODE, VARIABLE_TYPE, VARIABLE_VALUE, and audit columns.
- OKC_K_ARTICLES_B (aliased KART) — the article base table; joined on KART.ID = VAR.CAT_ID to supply DOCUMENT_ID and DOCUMENT_TYPE.
- OKC_BUS_VARIABLES_TL (aliased VAR_DEF) — the translatable variable definition table; supplies VARIABLE_NAME and DESCRIPTION, filtered by VAR_DEF.LANGUAGE = USERENV('LANG') so that output respects the session language.
- OKC_BUS_VARIABLES_B (aliased VAR_DEF_B) — the base variable definition table; supplies VARIABLE_DATATYPE.
The join logic keys the value row to the article via CAT_ID, and to both definition tables via VARIABLE_CODE. Note that the join on VARIABLE_CODE rather than a surrogate ID is the defining structural characteristic of this view.
Key Columns
- ROW_ID — the ROWID of the source variable row, useful for uniquely identifying a value instance.
- DOCUMENT_ID / DOCUMENT_TYPE — identifies the parent contract document and its type, obtained from the article record.
- CAT_ID — the contract article ID to which the variable value belongs; joins to OKC_K_ARTICLES_B.ID.
- VARIABLE_CODE / VARIABLE_NAME / VARIABLE_DESCRIPTION — the code, session-language name, and description of the variable.
- VARIABLE_TYPE, EXTERNAL_YN, ATTRIBUTE_VALUE_SET_ID — classify the variable, indicate whether it is externally visible, and reference any value set governing its values.
- VARIABLE_VALUE_ID / VARIABLE_VALUE — the surrogate key and the actual stored value of the variable.
- VARIABLE_DATATYPE — the datatype of the variable (e.g., text, number, date), critical for casting VARIABLE_VALUE correctly.
- OBJECT_VERSION_NUMBER, CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN — standard audit and concurrency columns.
Common Use Cases and Queries
Typical scenarios include listing all variables and their values for a given document, auditing which articles carry externally visible variables, and joining variable values into contract reporting extracts. Sample SQL:
- Retrieve values for a specific document:
SELECT document_id, cat_id, variable_code, variable_name, variable_value, variable_datatype FROM apps.okc_terms_var_values_v WHERE document_id = :p_document_id;
- Filter to externally visible variables only:
SELECT variable_code, variable_name, variable_value FROM apps.okc_terms_var_values_v WHERE external_yn = 'Y' AND document_id = :p_document_id;
- Aggregate usage of a variable code across documents:
SELECT variable_code, COUNT(*) occurrences FROM apps.okc_terms_var_values_v GROUP BY variable_code;
Because VARIABLE_VALUE is stored generically, consumers should interpret it according to VARIABLE_DATATYPE before applying numeric or date logic.
-
View: OKC_TERMS_VAR_VALUES_V
12.1.1
owner:APPS, object_type:VIEW, fnd_design_data:OKC.OKC_TERMS_VAR_VALUES_V, object_name:OKC_TERMS_VAR_VALUES_V, status:VALID, product: OKC - Contracts Core , implementation_dba_data: APPS.OKC_TERMS_VAR_VALUES_V ,
-
View: OKC_TERMS_VAR_VALUES_V
12.2.2
owner:APPS, object_type:VIEW, fnd_design_data:OKC.OKC_TERMS_VAR_VALUES_V, object_name:OKC_TERMS_VAR_VALUES_V, status:VALID, product: OKC - Contracts Core , implementation_dba_data: APPS.OKC_TERMS_VAR_VALUES_V ,
-
SYNONYM: APPS.OKC_BUS_VARIABLES_TL
12.2.2
owner:APPS, object_type:SYNONYM, object_name:OKC_BUS_VARIABLES_TL, status:VALID,
-
SYNONYM: APPS.OKC_BUS_VARIABLES_TL
12.1.1
owner:APPS, object_type:SYNONYM, object_name:OKC_BUS_VARIABLES_TL, status:VALID,
-
SYNONYM: APPS.OKC_K_ART_VARIABLES
12.2.2
owner:APPS, object_type:SYNONYM, object_name:OKC_K_ART_VARIABLES, status:VALID,
-
SYNONYM: APPS.OKC_BUS_VARIABLES_B
12.1.1
owner:APPS, object_type:SYNONYM, object_name:OKC_BUS_VARIABLES_B, status:VALID,
-
SYNONYM: APPS.OKC_K_ART_VARIABLES
12.1.1
owner:APPS, object_type:SYNONYM, object_name:OKC_K_ART_VARIABLES, status:VALID,
-
SYNONYM: APPS.OKC_BUS_VARIABLES_B
12.2.2
owner:APPS, object_type:SYNONYM, object_name:OKC_BUS_VARIABLES_B, status:VALID,
-
VIEW: APPS.OKC_TERMS_VAR_VALUES_V
12.2.2
owner:APPS, object_type:VIEW, fnd_design_data:OKC.OKC_TERMS_VAR_VALUES_V, object_name:OKC_TERMS_VAR_VALUES_V, status:VALID,
-
VIEW: APPS.OKC_TERMS_VAR_VALUES_V
12.1.1
owner:APPS, object_type:VIEW, fnd_design_data:OKC.OKC_TERMS_VAR_VALUES_V, object_name:OKC_TERMS_VAR_VALUES_V, status:VALID,
-
SYNONYM: APPS.OKC_K_ARTICLES_B
12.1.1
owner:APPS, object_type:SYNONYM, object_name:OKC_K_ARTICLES_B, status:VALID,
-
12.2.2 DBA Data
12.2.2
-
12.1.1 DBA Data
12.1.1
-
SYNONYM: APPS.OKC_K_ARTICLES_B
12.2.2
owner:APPS, object_type:SYNONYM, object_name:OKC_K_ARTICLES_B, status:VALID,
-
12.1.1 FND Design Data
12.1.1
-
12.2.2 FND Design Data
12.2.2
-
12.2.2 DBA Data
12.2.2
-
eTRM - OKC Tables and Views
12.2.2
description: Intersection entity between rules and templates ,
-
eTRM - OKC Tables and Views
12.1.1
description: Intersection entity between templates and rules. ,
-
12.1.1 DBA Data
12.1.1
-
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 ,