Search Results update_contract_version




Overview

OKC_CVM_PVT is a private PL/SQL package in the Oracle E-Business Suite Contracts (OKC) module that manages contract version numbering. The package name derives from its role as the Contracts Version Management private API: the CVM segment refers to contract version management, while the PVT suffix classifies it as an internal helper package not intended for direct customer invocation. It operates against the OKC_K_VERS_NUMBERS and OKC_K_VERS_NUMBERS_H tables, which store the major and minor version identifiers and their audit history for contract documents held in OKC_K_HEADERS_ALL_B. The package header declares strongly typed PL/SQL records and index-by tables (okc_k_vers_numbers_h_rec_type, cvm_rec_type, cvmv_rec_type) that mirror the column layouts of those tables, and it initializes each attribute to OKC_API.G_MISS_NUM or OKC_API.G_MISS_DATE so that calling code can distinguish supplied values from unpopulated ones. A package-global variable, g_trans_id, carries a transaction identifier across calls within a session.

Key Procedures and Functions

Tables Accessed

Version data is read and written in OKC_K_VERS_NUMBERS, which holds the active major and minor version numbers, the object version number, and the standard WHO audit columns for each contract. Historical and archived version rows are maintained in OKC_K_VERS_NUMBERS_H, matching the record type declared in the package header. The parent contract header is referenced in OKC_K_HEADERS_ALL_B. Transaction control relies on DBMS_TRANSACTION, used to manage transaction identity and deferral, and on PLITBLM, the PL/SQL table-index management utility used for the index-by table types defined in the package specification. All tables are reached through APPS synonyms.

Usage Notes

Because the package is classified PVT, it is not a supported direct entry point for custom development; it is invoked internally by the Contracts versioning framework and by the 28 documented packages that reference it. Typical invocations occur when a user creates, revises, or deletes a contract version from the Contracts Authoring form, when concurrent programs reconcile or archive contract version history, and when other OKC private APIs need to serialize version assignment. The LOCK_ROW and DEFER_MINOR_VERSION_UPDATE routines exist to prevent lost updates when multiple sessions touch the same contract, and CLEAR_G_TRANSACTION_ID should be called after the transaction identifier is no longer needed so session state does not leak between operations. In EBS 12.1.1 and 12.2.2 the package ships under APPS with the header revision shown above.