Search Results oke_version_pvt




Overview

OKE_VERSION_PVT is an Oracle E-Business Suite private PL/SQL package owned by the APPS schema that supports the contract versioning framework within Oracle Contracts Core and Oracle Procurement Contracts. It operates as the internal implementation layer behind the public API OKE_VERSION_PUB, providing the low-level mechanics required to capture a snapshot of a contract's current state and to reinstate a previously captured version. Contract versioning allows organizations to preserve negotiated language, terms, and structure at defined milestones, then return to a prior state when amendments are rejected, negotiations restart, or audit comparisons are required.

The package is classified as a PVT (private) API in the ETRM repository. It is not intended for direct invocation by customers or integrators; instead, it is called by its public counterpart and by itself recursively during processing. The VALID status confirms the package is compiled and operational in the documented environment. Its dependency on FND_API indicates it follows the standard Oracle Application Object Library API conventions, including the use of global constants for success, error, and unexpected error return values and standardized message handling.

Key Procedures and Functions

  • VERSION_CONTRACT — Creates a new contract version by capturing the current state of the contract header and its associated version-numbered entities. This procedure supports the versioning action that business users initiate when they want to freeze or replicate the contract as it currently stands for further editing or comparison.
  • RESTORE_CONTRACT_VERSION — Reinstates a previously stored contract version, returning the contract to the state captured at that version. This supports rollback and comparison workflows, allowing users to abandon an in-progress amendment and resume from a known, approved baseline.

Both procedures are exposed only within the private layer and are wrapped by OKE_VERSION_PUB, which performs validation, security checks, and error translation before delegating to this package.

Tables Accessed

The package interacts with the following database objects, referenced through APPS synonyms:

  • OKC_K_VERS_NUMBERS — Stores contract version numbering information for the contracts core model; used to create and resolve version identifiers.
  • OKE_K_VERS_NUMBERS_H — The history table holding prior version records for procurement contracts; written during version creation and read during restore operations.
  • ALL_TAB_COLUMNS — Data dictionary view consulted to dynamically determine column definitions when copying or reconstructing versioned data.
  • DBMS_SQL — Oracle-supplied dynamic SQL package used to construct and execute statements at runtime, since versioning logic must handle contract structures that vary by configuration.
  • PLITBLM — Oracle-supplied PL/SQL table manipulation utility used to manage in-memory collections during processing.
  • USER_SYNONYMS — Referenced to resolve synonym mappings for the dynamically generated SQL.

Usage Notes

OKE_VERSION_PVT is invoked indirectly. End users trigger versioning through the Contract Management or Procurement Contracts forms, which call OKE_VERSION_PUB; that public package in turn calls this private package. Concurrent programs that process contract amendments or generate version comparison reports may also reach this code path. Custom development should call OKE_VERSION_PUB rather than the private layer, since the public API enforces validation rules and is supported across releases.

The reliance on DBMS_SQL and ALL_TAB_COLUMNS means the package can adapt to site-specific contract flexfield configurations, but it also means that structural changes to the underlying OKC and OKE tables during upgrades should be followed by a recompile of this package. Because it manipulates version history directly, any debugging or extension work should be done in a test environment with representative contract data.