Search Results version_doc




Overview

OKC_TERMS_VERSION_GRP is a PL/SQL package body owned by the APPS schema in Oracle E-Business Suite, classified within ETRM as a "GRP" (group) API. Its business purpose is to manage the versioning lifecycle of contract terms in the Oracle Contracts (OKC) module. When a contract or related document is versioned, amended, restored, or deleted, the terms associated with that document must be kept in synchronization with the corresponding document version. This package encapsulates the logic that keeps terms versions aligned with document versions, ensuring that historical, current, and amendment states remain consistent and auditable.

The package header constants and structure follow the standard EBS API conventions, building on FND_API global constants such as G_FALSE, G_TRUE, G_RET_STS_SUCCESS, G_RET_STS_ERROR, and G_RET_STS_UNEXP_ERROR. It also uses FND_LOG for diagnostic logging, emitting procedure-level trace messages keyed to the module name 'okc.plsql.OKC_TERMS_VERSION_GRP'. The naming and header comment (OKCGDVRB.pls, version 120.0) confirm it is a delivered Oracle application object rather than a customer extension.

Key Procedures and Functions

The documented package exposes four procedures, all oriented around terms-version maintenance:

  • VERSION_DOC — The primary entry point, invoked to version terms whenever a document is versioned. It accepts the document type and identifier, the target version number, a flag to clear amendment data, and an option to include generated attachments. It follows the standard EBS API signature pattern with p_api_version, p_init_msg_list, p_commit, and the x_return_status, x_msg_data, and x_msg_count OUT parameters, and declares local constants l_api_version and l_api_name for logging.
  • RESTORE_DOC_VERSION — Restores terms to a previously saved document version, re-establishing the terms state that corresponded to an earlier version.
  • DELETE_DOC_VERSION — Removes terms associated with a specific document version when that version is deleted.
  • CLEAR_AMENDMENT — Clears amendment-related terms data, typically when an amendment is applied, cancelled, or a version is finalized.

Tables Accessed

The ETRM metadata for this object does not enumerate specific tables accessed via APPS synonyms. Functionally, the package operates on the OKC terms and document-version tables that store contract terms text, terms layout, and version history — the underlying storage that Version_Doc, Restore_Doc_Version, and Delete_Doc_Version read and write. Because the metadata is limited on this point, customers should confirm exact table dependencies against the installed OKC schema when performing impact analysis.

Usage Notes

OKC_TERMS_VERSION_GRP is a supporting group API invoked internally by the Oracle Contracts application rather than called directly by end users. It is referenced by six other packages in the EBS instance, indicating it is called from the higher-level contract versioning and amendment flows, such as the document versioning logic in the Contracts authoring forms and related APIs. It may also be reached through concurrent programs that version or archive contracts. Custom code should call it only through the documented public procedures and honor the standard FND_API return-status contract, checking x_return_status for G_RET_STS_SUCCESS, G_RET_STS_ERROR, or G_RET_STS_UNEXP_ERROR before proceeding. As with all delivered OKC packages, direct modification is not supported; extensions should wrap the public APIs.