Search Results copy_contract




Overview

The APPS.OKL_VP_COPY_CONTRACT_PUB package body is a public API within the Oracle E-Business Suite Contracts (OKL) module, specifically belonging to the ETRM (Enterprise Contracts / Lease Management) family of objects. Its principal business function is to provide a callable, externally visible entry point for copying an existing contract record into a new contract. In the OKL architecture, packages conventionally follow a two-tier naming pattern: a _PUB (public) package that exposes a stable, documented interface for external callers, and a _PVT (private) package that encapsulates the substantive business logic. This package adheres strictly to that pattern, acting as a thin wrapper that delegates all substantive work to the underlying private implementation.

Key Procedures and Functions

The package body documents a single public procedure:

  • COPY_CONTRACT — This is the sole documented procedure exposed by the package. It serves as the public wrapper for the contract copy process API. Its purpose is to receive a copy request record, invoke the corresponding private procedure OKL_VP_COPY_CONTRACT_PVT.copy_contract to perform the actual duplication, and return the identifier of the newly created contract to the caller. The procedure accepts a copy header record structure that encapsulates the source contract information and validation parameters, and it returns a newly generated contract identifier along with standard Oracle API return and message stack outputs. The implementation includes explicit exception handling that translates error and unexpected-error return statuses from the private layer into the standard FND_API exceptions, ensuring that callers receive consistent error semantics conforming to the Oracle Application Object Library API framework.

Tables Accessed

The documentation metadata for this object does not enumerate any directly referenced tables via APPS synonyms within the package body itself. This is consistent with the wrapper design: the public package contains no SQL statements and performs no direct data manipulation. All table access — insertion of the new contract header, copying of contract lines, parties, and related attributes — is performed by the private package OKL_VP_COPY_CONTRACT_PVT and its downstream dependencies. Consequently, the OKL_VP_COPY_CONTRACT_PUB body contributes no direct read or write operations against the underlying OKL contract tables; its role is purely orchestration and interface stabilization.

Usage Notes

Because this package is classified as a public (PUB) API, it is the sanctioned integration point for any process needing to copy a contract. It is typically invoked in several contexts: from ETRM contract entry forms where a user selects a "Copy Contract" action, from concurrent programs that batch-duplicate contracts, and from custom PL/SQL code or extensions that require programmatic contract duplication. Callers must populate a copy_header_rec_type record and be prepared to receive the new contract identifier, along with message count and message data outputs for error diagnosis. The package is referenced by at least three other packages in the ETRM schema, confirming its role as a shared utility. Standard practice requires callers to check the returned status for G_RET_STS_SUCCESS and to inspect the message stack when errors are indicated. The header comment (version 120.2) indicates the object has been stable since at least 2005, and the explicit comment regarding vendor program copying reflects a specific enhancement to ensure copied contracts retain associated vendor program information.