Search Results oke_k_types_vl




Overview

The OKE_K_TYPES_VL view is a multi-lingual (VL, "view language") database view owned by the APPS schema in Oracle E-Business Suite release 12.1.1 and 12.2.2. It belongs to the OKE – Project Contracts product family and exposes the definition of contract document types (also referred to as contract "k-types") in the language of the current session. Because it is a VL view, it joins a language-independent base table (OKE_K_TYPES_B) with its translation table (OKE_K_TYPES_TL), returning translated name and description values alongside the operational attributes of each contract type. In EBS reporting and integration contexts, the view serves as the canonical read-only source for contract type master data: report writers, Oracle BI Publisher templates, interfaces, and custom concurrent programs query it to resolve a K_TYPE_CODE into a user-visible name and classification without needing to join the underlying _B, _TL, and lookup tables manually. Its definition also denormalizes lookup meanings and approval path names, making it convenient for inquiry screens and extracts that require a single flat row per contract type.

Underlying Base Objects

The ETRM metadata documents four referenced base objects, combined in the view SQL as follows:

  • OKE_K_TYPES_B (synonym) – the language-independent base table holding the core contract type records: K_TYPE_CODE, TYPE_CLASS_CODE, INTENT, APPROVAL_PATH_ID, START_DATE_ACTIVE, END_DATE_ACTIVE, audit columns, and the 15 ATTRIBUTE columns. It is the primary driving table (alias B) in the view.
  • OKE_K_TYPES_TL (synonym) – the translation table (alias T), joined on K_TYPE_CODE and restricted to T.LANGUAGE = USERENV('LANG'). It supplies the translated K_TYPE_NAME and DESCRIPTION.
  • FND_LOOKUP_VALUES_VL (view) – the Applications lookup values view (alias TC), filtered to LOOKUP_TYPE = 'CONTRACT_TYPE_CLASS' and VIEW_APPLICATION_ID = 777, supplying the TYPE_CLASS_NAME meaning for the stored TYPE_CLASS_CODE.
  • OKE_APPROVAL_PATHS_TL (synonym) – the approval path translation table (alias A), outer-joined on APPROVAL_PATH_ID with the same language restriction, supplying APPROVAL_PATH_NAME. The (+) outer-join syntax confirms that a contract type need not be associated with an approval path.

Key Columns

The view exposes the union of the base table columns plus the derived translated values:

  • ROW_ID – the row identifier from OKE_K_TYPES_B, used for DML against the base table rather than the view itself.
  • K_TYPE_CODE – the primary business key identifying the contract document type; joins to contract headers and other OKE entities.
  • K_TYPE_NAME – the translated, user-facing name of the contract type from OKE_K_TYPES_TL.
  • TYPE_CLASS_CODE / TYPE_CLASS_NAME – the stored classification code and its translated lookup meaning (for example, the contract type class used to group document types).
  • INTENT – indicates the functional intent of the document type within the contract lifecycle.
  • DESCRIPTION – the translated description of the contract type.
  • APPROVAL_PATH_ID / APPROVAL_PATH_NAME – the associated approval path identifier and its translated name, null when no path is assigned.
  • START_DATE_ACTIVE / END_DATE_ACTIVE – the effective date range during which the contract type is usable.
  • CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN – standard EBS audit columns.
  • ATTRIBUTE_CATEGORY and ATTRIBUTE1–ATTRIBUTE15 – the standard DFF (descriptive flexfield) columns for customer-defined contract type attributes.

Common Use Cases and Queries

Typical scenarios include populating LOVs and report parameters with active contract types, validating a K_TYPE_CODE entered through an interface, and joining contract headers to their type descriptions. The following query returns all currently active contract types for the current session language, ordered by name:

SELECT k_type_code, k_type_name, type_class_name, approval_path_name
FROM apps.oke_k_types_vl
WHERE TRUNC(SYSDATE) BETWEEN NVL(start_date_active, TRUNC(SYSDATE)) AND NVL(end_date_active, TRUNC(SYSDATE))
ORDER BY k_type_name;

A second pattern joins the view to contract data to label documents in an extract:

SELECT c.contract_number, t.k_type_name, t.type_class_name
FROM apps.oke_contracts_all c, apps.oke_k_types_vl t
WHERE c.k_type_code = t.k_type_code;

Because the view is a VL construct, multilingual deployments automatically return translated names without requiring callers to add language predicates; the USERENV('LANG') restriction embedded in the view text handles this. All access should be read-only; maintenance of contract type definitions is performed through the OKE contract type setup forms against the underlying _B and _TL tables.