Search Results okc_k_vers_numbers_h




Overview

OKC_K_VERS_NUMBERS_H is the history (audit) table for OKC_K_VERS_NUMBERS in the OKC — Contracts Core module of Oracle E-Business Suite, valid in both 12.1.1 and 12.2.2. It records the version-numbering lineage assigned to contract documents and contract templates, capturing the major and minor version identifiers associated with each contract header (CHR_ID). The corresponding non-history table stores the current version state; this companion table preserves the temporal trail of those assignments as records are inserted, updated, or superseded.

Under the heuristic Data Vault classification derived from its foreign-key structure, this object is modeled as a standalone entity — it references no other OKC tables and is not itself a dependent of a parent contract table through a documented FK. This classification should be read as a modeling suggestion: in a Data Vault build, version-number history is typically treated as a satellite attached to the contract hub or link, with the change-date and audit columns supplying the load timestamp semantics. The absence of outbound foreign keys to OKC contract tables reinforces that it functions as a raw audit log rather than a relational hub.

Key Information Stored

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

  • CHR_ID — Contract header identifier; identifies the contract or template whose version numbering is being tracked. This is the principal business join column.
  • MAJOR_VERSION — The major version number of the contract document.
  • MINOR_VERSION — The minor version number within the major version.
  • OBJECT_VERSION_NUMBER — Optimistic locking / row versioning column used by the OAF framework during concurrent updates.
  • CREATED_BY, CREATION_DATE — Who and when the history row was created; these approximate the effective date of the version change.
  • LAST_UPDATED_BY, LAST_UPDATE_DATE — Who and when the row was most recently modified.
  • LAST_UPDATE_LOGIN — Login identifier of the updating session, useful for forensic audit.
  • SECURITY_GROUP_ID — Multi-tenant / operating-unit security classification, with a documented foreign key to FND_SECURITY_GROUPS.

The surrogate primary key is OKC_K_VERS_NUMBERS_H_PK on (CHR_ID, MAJOR_VERSION, MINOR_VERSION). A separate unique index, OKC_K_VERS_NUMBERS_H_U1, covers the same column set as (CHR_ID, MINOR_VERSION, MAJOR_VERSION), confirming the business key is the version triple, differing only in column ordering.

Common Use Cases and Queries

Typical uses include reconstructing the version history of a contract, reporting on revision frequency, and auditing who created or modified a version record.

  • Full version history for a contract:
    SELECT chr_id, major_version, minor_version,
           creation_date, created_by, last_update_date
    FROM   okc_k_vers_numbers_h
    WHERE  chr_id = :p_chr_id
    ORDER  BY major_version, minor_version;
  • Detecting the latest revision per contract: use MAX(major_version), MAX(minor_version) grouped by chr_id.
  • Audit trail by user: filter on created_by or last_updated_by alongside creation_date ranges.
  • Reconciliation: compare the row set against the live OKC_K_VERS_NUMBERS table to identify records removed or superseded.
  • Security-scoped reporting: join SECURITY_GROUP_ID to FND_SECURITY_GROUPS when enforcing MOAC or multi-org access rules.

Related Objects

  • OKC_K_VERS_NUMBERS — the primary (non-history) counterpart; join on CHR_ID, MAJOR_VERSION, MINOR_VERSION.
  • OKC_K_HEADERS / OKC_K_HEADERS_H — contract header tables providing descriptive context for CHR_ID.
  • FND_SECURITY_GROUPS — referenced via the documented SECURITY_GROUP_ID foreign key.
  • OKC_K_VERS_NUMBERS_H_PK and OKC_K_VERS_NUMBERS_H_U1 — the primary and unique indexes enforcing key integrity.
  • OKC Contract Versioning APIs — version-management PL/SQL that inserts history rows when contract versions are created or revised.