Search Results copy_latest_articles




Overview

The APPS.OKC_COPY_CONTRACT_PUB package body is the public API layer within Oracle E-Business Suite's Contract Lifecycle Management (formerly ETRM — Enterprise Trading and Risk Management) module responsible for duplicating contract records. It allows a user or process to generate a complete new contract from an existing source contract, carrying forward structure, parties, articles, lines, rules, and components while applying copy-control logic that governs whether a given source contract is eligible to be duplicated. The package is classified as a PUB (public) API, meaning it is the supported entry point for external callers, delegating the substantive work to the private worker package OKC_COPY_CONTRACT_PVT.

Because it sits at the boundary between the public contract model and internal business logic, it depends on OKC_API and OKC_CVM_PVT for core contract and version-management operations, on FND_PROFILE for profile option evaluation, and on the standard FND_API framework for message handling and API conventions. It is documented across both EBS 12.1.1 and 12.2.2, and is itself referenced by five other packages, indicating that contract copy is reused as a building block by higher-level business flows rather than being an isolated utility.

Key Procedures and Functions

The package exposes fourteen documented procedures and functions. They fall into three broad categories.

Tables Accessed

The ETRM metadata does not enumerate explicit base tables; access is performed through APPS synonyms. Operationally, the package reads the source contract header and its child entities (articles, party roles, rules, lines, and components) and writes corresponding new rows for the target contract. The copy is version-aware — the presence of COPY_LATEST_ARTICLES and the dependency on OKC_CVM_PVT confirm that contract version management (CVM) tables are consulted to resolve which article versions belong to the effective contract. Party role duplication writes to the contract party role tables, and rule duplication writes to the contract rule tables used by the rules engine. Because all DML is routed through OKC_COPY_CONTRACT_PVT, the public package itself is largely an interface wrapper.

Usage Notes

OKC_COPY_CONTRACT_PUB is typically invoked when a user selects a "Copy Contract" or "Create from Template" action in the Contracts workbench, and by concurrent programs that mass-copy contracts (hence COPY_CONCURRENT). Custom code should call COPY_CONTRACT rather than the PVT worker, preceding the call with IS_COPY_ALLOWED to honor copy restrictions such as contract type, status, or security. Because the package relies on FND_API conventions, callers must initialize the standard API message list and check the return status before committing. As a PUB API it is a supported extension point, but it is not referenced by any database object, so upgrades that alter internal PVT logic can change behavior without affecting the public signature.