Results for “okc_variable_doc_types_u2”

12 results




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

OKC.OKC_VARIABLE_DOC_TYPES is a reference and configuration table within the Oracle Contracts (OKC) module of Oracle E-Business Suite. Its purpose is to define which document types are associated with system-defined variables, and by extension to determine the source from which a given system variable draws its value. In practical terms, the table acts as a mapping between a business variable and a document type, while also recording the application-context metadata (View Object name and attribute name) that the runtime engine consults when resolving a variable value.

The table resides in the APPS_TS_SEED tablespace, consistent with its role as a seeded configuration object delivered by Oracle. It is designated VALID and is owned by the OKC schema, with FND Design Data registered under OKC.OKC_VARIABLE_DOC_TYPES. The ETRM metadata classifies the object heuristically as a link table. This is a modelling suggestion rather than a declared property, and it is well-supported: the table resolves a many-to-many relationship through two foreign keys — DOC_TYPE referencing OKC_BUS_DOC_TYPES_B and VARIABLE_CODE referencing OKC_BUS_VARIABLES_B.

Key Information Stored

The most significant columns are the two key attributes and the resolution metadata that follows them.

  • VARIABLE_CODE (VARCHAR2, 30, mandatory) — Identifies the system-defined business variable. It is part of the primary key and a foreign key to OKC_BUS_VARIABLES_B.
  • DOC_TYPE (VARCHAR2, 30, mandatory) — Identifies the document type associated with the variable. It is part of the primary key and a foreign key to OKC_BUS_DOC_TYPES_B.
  • VIEW_OBJECT_NAME (VARCHAR2, 2000) — The name of the View Object of which the variable is an attribute; this drives the source lookup against the application tier.
  • APPLICATION_ID (NUMBER) — The owning application identifier, foreign key to FND_APPLICATION.
  • ATTRIBUTE_NAME (VARCHAR2, 50) — The attribute on the View Object used to source the variable value.
  • ATTRIBUTE_INDEX (NUMBER) — Retained for future reference; not currently in active use.
  • OBJECT_VERSION_NUMBER (NUMBER) — Optimistic-locking column, set to 1 on insert and incremented on update, used by APIs to confirm the current record is being passed.
  • CREATED_BY, CREATION_DATE, LAST_UPDATE_DATE, LAST_UPDATED_BY, LAST_UPDATE_LOGIN — Standard Who columns providing audit lineage.

The relationship metadata notes ZD_EDITION_NAME as an additional documented column in the 12.2.2 physical schema, an editioning artifact. Two unique indexes serve as business-key candidates: OKC_VARIABLE_DOC_TYPES_U1 on (DOC_TYPE, VARIABLE_CODE, ZD_EDITION_NAME) and OKC_VARIABLE_DOC_TYPES_U2 on (VARIABLE_CODE, DOC_TYPE, ZD_EDITION_NAME). The user-searched index OKC_VARIABLE_DOC_TYPES_U1 is precisely this first unique index, defined in APPS_TS_SEED. The surrogate identity of this table is the composite primary key OKC_VARIABLE_DOC_TYPES_PK1 on (VARIABLE_CODE, DOC_TYPE).

Common Use Cases and Queries

Typical use cases include diagnosing why a contract variable resolved to an unexpected value, auditing which document types are wired to a given system variable, and validating seeded configuration after an upgrade or patch.

A query joining both parent tables to describe the configuration:

  • SELECT v.VARIABLE_CODE, d.DOC_TYPE, t.VIEW_OBJECT_NAME, t.ATTRIBUTE_NAME FROM OKC.OKC_VARIABLE_DOC_TYPES t JOIN OKC.OKC_BUS_VARIABLES_B v ON t.VARIABLE_CODE = v.VARIABLE_CODE JOIN OKC.OKC_BUS_DOC_TYPES_B d ON t.DOC_TYPE = d.DOC_TYPE;
  • To inspect all document types bound to one variable: SELECT DOC_TYPE FROM OKC.OKC_VARIABLE_DOC_TYPES WHERE VARIABLE_CODE = :p_variable;
  • To determine which application supplies the source View Object: SELECT VARIABLE_CODE, APPLICATION_ID, VIEW_OBJECT_NAME, ATTRIBUTE_NAME FROM OKC.OKC_VARIABLE_DOC_TYPES WHERE APPLICATION_ID = :p_app_id;
  • To find variables without a document-type binding, use a NOT EXISTS anti-join against OKC_BUS_VARIABLES_B.

Because the table is seeded and its unique indexes are defined in APPS_TS_SEED, reporting should treat rows as configuration rather than transactional data. In upgrade testing, comparing row counts and key combinations against a baseline is a reliable smoke test for seed integrity.

Related Objects

  • OKC.OKC_BUS_VARIABLES_B — Parent of VARIABLE_CODE; defines the system variable itself.
  • OKC.OKC_BUS_DOC_TYPES_B — Parent of DOC_TYPE; defines available document types.
  • OKC.OKC_VARIABLE_DOC_TYPES_U1 — Unique index on (DOC_TYPE, VARIABLE_CODE, ZD_EDITION_NAME).
  • OKC.OKC_VARIABLE_DOC_TYPES_U2 — Unique index on (VARIABLE_CODE, DOC_TYPE, ZD_EDITION_NAME).
  • FND_APPLICATION — Referenced by APPLICATION_ID; resolves the owning application name.
  • Related OKC variables and document-type views that consume VIEW_OBJECT_NAME and ATTRIBUTE_NAME during runtime value resolution.