Search Results g_amend_code_deleted
Overview
OKC_TERMS_VERSION_PVT is the private implementation package for version management of Oracle Contracts terms and template documents in Oracle E-Business Suite. It belongs to the Oracle Knowledge and Contracts (OKC) module, which provides the contracts authoring and terms repository infrastructure used by Oracle Order Management, Oracle Quoting, and Oracle Service Contracts. The package manages the lifecycle of document versions — template-derived terms documents, amendments, sections, and articles — including version creation, restoration, deletion, and amendment cleanup.
The package declares the standard Oracle EBS API constants in its specification header, including G_RET_STS_SUCCESS, G_RET_STS_ERROR, and G_RET_STS_UNEXP_ERROR, drawn from FND_API. The specific identifier g_ret_sts_error referenced by callers corresponds to the FND_API.G_RET_STS_ERROR constant (a VARCHAR2(1) status flag) used throughout the package to distinguish an expected business error from an unexpected system error. Procedures within OKC_TERMS_VERSION_PVT set the return status to this value when a business rule validation fails, so that calling APIs and forms can present a controlled error rather than an unhandled exception.
Key Procedures and Functions
- CLEAR_AMENDMENT — Removes or resets amendment-related data associated with a terms document version. It supports the amendment workflow by clearing the amendment marker (the package defines G_AMEND_CODE_DELETED as 'DELETED') so that a document no longer carries an active amendment designation.
- VERSION_DOC — Creates a new version of an existing terms document. This is the core versioning routine: it copies the current document structure (sections and articles) into a new version record, typically before an amendment is applied, preserving the prior state for audit and rollback.
- RESTORE_DOC_VERSION — Restores a document to a previously saved version. It replaces the current active content with the snapshot held in the specified prior version, enabling users to revert changes made through amendment processing.
- DELETE_DOC_VERSION — Deletes a specified document version and its dependent section and article rows, maintaining referential integrity of the version history.
The package also defines internal (private) procedures bracketed by the INTERNAL/EXTERNAL PROCEDURES comment markers, which are not exposed to external callers.
Tables Accessed
- OKC_ARTICLES_ALL — Stores the article-level (lowest granularity) content of terms documents. Read and written during version creation, restoration, and deletion.
- OKC_K_ARTICLES_B — The base table holding contract article definitions linked to knowledge/terms structures; accessed to resolve article content when versioning.
- OKC_SECTIONS_B — Holds section-level metadata that groups articles within a terms document; read to reconstruct the document hierarchy for a version.
- OKC_TEMPLATE_USAGES — Records where and how a template has been used. Consulted to determine whether a document is template-derived (the package references G_TMPL_DOC_TYPE from OKC_TERMS_UTIL_GRP).
- DUAL — Used for single-row PL/SQL evaluations and constant assignments.
Usage Notes
OKC_TERMS_VERSION_PVT is a private (PVT) package and is not intended for direct invocation by end users or custom code; it is called by two other APPS packages, which serve as its public API layer. It is invoked during contract authoring sessions in the Oracle Contracts/Order Management forms, when an amendment is entered or when a user reverts a document to a prior version, and by concurrent processes that manage terms document history. Debug output is governed by the AFLOG_ENABLED profile option and the FND_LOG runtime level (G_DBG_LEVEL, G_PROC_LEVEL, G_EXCP_LEVEL).
Because the package returns status through FND_API constants, custom integrations should not call it directly. Instead, they should invoke the documented public wrapper packages and check the return status against G_RET_STS_SUCCESS, G_RET_STS_ERROR, and G_RET_STS_UNEXP_ERROR, handling the error status by retrieving the associated message from the standard FND_MSG_PUB message stack.
-
APPS.OKC_TERMS_VERSION_PVT SQL Statements
12.1.1
-
APPS.OKC_TERMS_VERSION_PVT SQL Statements
12.2.2
-
APPS.OKC_TERMS_QA_PVT SQL Statements
12.1.1
-
APPS.OKC_TERMS_QA_PVT SQL Statements
12.2.2
-
APPS.OKC_TERMS_COPY_PVT SQL Statements
12.1.1
-
APPS.OKC_K_ARTICLES_GRP SQL Statements
12.1.1
-
APPS.OKC_K_ARTICLES_GRP SQL Statements
12.2.2
-
APPS.OKC_TERMS_COPY_PVT SQL Statements
12.2.2
-
APPS.OKC_TERMS_UTIL_GRP SQL Statements
12.1.1
-
APPS.OKC_TERMS_SECTIONS_GRP SQL Statements
12.2.2
-
APPS.OKC_K_ENTITY_LOCKS_PKG SQL Statements
12.2.2
-
APPS.OKC_TERMS_SECTIONS_GRP SQL Statements
12.1.1
-
APPS.OKC_TERMS_UTIL_GRP SQL Statements
12.2.2
-
PACKAGE BODY: APPS.OKC_TERMS_VERSION_PVT
12.2.2
-
PACKAGE BODY: APPS.OKC_TERMS_VERSION_PVT
12.1.1
-
APPS.OKC_MRV_UTIL SQL Statements
12.2.2
-
PACKAGE BODY: APPS.OKC_K_ENTITY_LOCKS_PKG
12.2.2
-
APPS.OKC_K_ARTICLES_PVT SQL Statements
12.2.2
-
PACKAGE BODY: APPS.OKC_K_ARTICLES_GRP
12.1.1
-
APPS.OKC_K_ARTICLES_PVT SQL Statements
12.1.1
-
PACKAGE BODY: APPS.OKC_K_ARTICLES_GRP
12.2.2
-
PACKAGE BODY: APPS.OKC_TERMS_QA_PVT
12.2.2
-
PACKAGE BODY: APPS.OKC_TERMS_QA_PVT
12.1.1
-
PACKAGE BODY: APPS.OKC_MRV_UTIL
12.2.2
-
APPS.OKC_TERMS_QA_PVT dependencies on OKC_SECTIONS_B
12.1.1
-
APPS.OKC_TERMS_QA_PVT dependencies on OKC_SECTIONS_B
12.2.2
-
APPS.OKC_TERMS_QA_PVT dependencies on OKC_VARIABLE_DOC_TYPES
12.2.2
-
APPS.OKC_TERMS_QA_PVT dependencies on OKC_VARIABLE_DOC_TYPES
12.1.1
-
APPS.OKC_TERMS_QA_PVT dependencies on STANDARD
12.1.1
-
APPS.OKC_TERMS_UTIL_GRP dependencies on OKC_ARTICLES_ALL
12.1.1
-
APPS.OKC_TERMS_QA_PVT dependencies on STANDARD
12.2.2
-
APPS.OKC_TERMS_UTIL_GRP dependencies on OKC_ARTICLES_ALL
12.2.2
-
APPS.OKC_K_ENTITY_LOCKS_GRP SQL Statements
12.2.2
-
APPS.OKC_TERMS_VERSION_PVT dependencies on OKC_SECTIONS_B
12.1.1
-
APPS.OKC_K_ARTICLES_PVT dependencies on OKC_SECTIONS_B
12.2.2
-
APPS.OKC_TERMS_VERSION_PVT dependencies on OKC_TERMS_UTIL_GRP
12.1.1
-
APPS.OKC_TERMS_VERSION_PVT dependencies on OKC_TERMS_UTIL_GRP
12.2.2
-
APPS.OKC_TERMS_VERSION_PVT dependencies on OKC_SECTIONS_B
12.2.2
-
APPS.OKC_TERMS_UTIL_GRP dependencies on OKC_K_ARTICLES_B
12.1.1
-
APPS.OKC_K_ARTICLES_PVT dependencies on OKC_SECTIONS_B
12.1.1
-
PACKAGE BODY: APPS.OKC_TERMS_SECTIONS_GRP
12.1.1
-
APPS.OKC_TERMS_VERSION_PVT dependencies on OKC_K_ARTICLES_B
12.2.2
-
APPS.OKC_TERMS_VERSION_PVT dependencies on OKC_K_ARTICLES_B
12.1.1
-
APPS.OKC_TERMS_QA_PVT dependencies on OKC_K_ARTICLES_B
12.2.2
-
APPS.OKC_TERMS_QA_PVT dependencies on OKC_K_ARTICLES_B
12.1.1
-
APPS.OKC_TERMS_SECTIONS_GRP dependencies on OKC_TERMS_UTIL_PVT
12.1.1
-
APPS.OKC_TERMS_SECTIONS_GRP dependencies on OKC_TERMS_UTIL_PVT
12.2.2
-
APPS.OKC_K_ARTICLES_GRP dependencies on OKC_TERMS_UTIL_PVT
12.2.2
-
APPS.OKC_TERMS_COPY_PVT dependencies on FND_PROFILE
12.2.2
-
APPS.OKC_TERMS_VERSION_PVT dependencies on OKC_TERMS_VERSION_PVT
12.1.1