Search Results okc_rep_contract_vers_u1




Overview

OKC.OKC_REP_CONTRACT_VERS is a transactional table in the Oracle E-Business Suite Contract Repository (OKC) schema that stores previous versions of contracts authored in the Contract Repository module. While the operational, current-state contract records reside in OKC_REP_CONTRACTS_ALL, this table preserves the historical snapshots that are created each time a contract is revised, copied, or re-versioned. In Oracle EBS 12.1.1 and 12.2.2 it functions as the archival and audit backbone for contract versioning, enabling users to review the state of a contract as it existed at any prior version number.

From a Data Vault modeling perspective, the metadata heuristic classifies OKC_REP_CONTRACT_VERS as a link entity, since it resolves the relationship between a contract identity and a discrete version number. A modeler may alternatively treat it as a satellite of the contract hub keyed by CONTRACT_ID and CONTRACT_VERSION_NUM, capturing descriptive attributes that change across versions.

Key Information Stored

The table's uniqueness is enforced by the primary key OKC_REP_CONTRACT_VERS_PK over (CONTRACT_ID, CONTRACT_VERSION_NUM). CONTRACT_ID is the surrogate identifier sourced from sequence OKC_REPO_CONTRACTS_ALL_S, while CONTRACT_VERSION_NUM is the auto-generated version counter that begins at 1 and increments by one for each new version. Importantly, the unique index OKC_REP_CONTRACT_VERS_U1 is defined on the identical column pair, confirming this two-column combination as the documented business-key candidate as well as the physical primary key.

Common Use Cases and Queries

Typical uses include contract audit reporting, version-history comparison, and reconstructing terms in force on a historical date. A representative query retrieves the highest archived version for a contract:

  • SELECT contract_id, contract_version_num, contract_name, contract_status_code FROM okc.okc_rep_contract_vers WHERE contract_id = :p_contract_id ORDER BY contract_version_num DESC;
  • Comparing amounts across versions: SELECT contract_version_num, amount, currency_code FROM okc.okc_rep_contract_vers WHERE contract_id = :id ORDER BY contract_version_num;
  • Identifying contracts still unsigned: WHERE contract_status_code != 'SIGNED' AND latest_signed_ver_number IS NULL.

Related Objects

  • OKC_BUS_DOC_TYPES_B — joined via CONTRACT_TYPE to resolve contract type definitions.
  • OKC_REP_CONTACT_ROLES_B — joined via NOTIFY_CONTACT_ROLE_ID for notification roles.
  • OKC_REP_CONTRACTS_ALL — the current-state contract master; join on CONTRACT_ID.
  • OKC_REP_CONTRACT_VERS itself — self-referenced via CONTRACT_ID for version chains.
  • OKC_REP_CONTRACT_DOCUMENTS — attached document metadata per contract version.
  • OKC_REP_CONTRACT_PARTIES — parties associated across versions.
  • OKC_REP_CONTRACT_LINES — line-level details linked by CONTRACT_ID and version.