Search Results okl_vp_copy_contract_pvt




Overview

OKL_VP_COPY_CONTRACT_PVT is a private PL/SQL package in the APPS schema that supports the Oracle E-Business Suite Lease and Finance Management (formerly Oracle Lease Management) vendor program module. Its single documented purpose is to provide the internal logic that copies a contract — specifically the vendor program contract and its associated governance, rule, process, and association structures — from a source contract to a new target contract. The API classification "PVT" indicates that this is a private package: it is not intended to be called directly by external customers or integrators, and Oracle does not expose it as a public interface. Instead, the package acts as the implementation layer behind the public wrapper OKL_VP_COPY_CONTRACT_PUB and its worker package OKL_VP_COPY_CONTRACT_PUB_W.

The package is central to the vendor program copy feature, which lets users duplicate an existing vendor program contract together with its rule groups, rules, parties, process definitions, and vendor program associations, rather than re-keying all configuration manually. It depends on OKC_K_HEADERS_V for contract header data and on OKL_API for the lease module's standard API utility routines, error handling, and message conventions.

Key Procedures and Functions

According to the documented metadata, the package exposes one procedure:

  • COPY_CONTRACT — The core routine that performs the copy operation for a vendor program contract. It orchestrates the duplication of the parent contract header and its dependent child records. Parameter lists are not documented in the ETRM metadata and therefore are not reproduced here; callers should treat this procedure as private and invoke it only through the public wrapper OKL_VP_COPY_CONTRACT_PUB.

Internally, COPY_CONTRACT is expected to leverage OKL_API routines for validation, error stacking, and commit/rollback behavior consistent with Oracle's API standards for the lease module.

Tables Accessed

The documented tables (referenced through APPS synonyms) are:

  • OKC_K_HEADERS_B — Stores the base contract header record; the procedure inserts a new header for the copied contract and reads the source header for cloning.
  • OKC_GOVERNANCES — Holds governance rules attached to the contract; these are duplicated so the new contract inherits the same governance behavior.
  • OKC_RULE_GROUPS_B and OKC_RULES_B — Store rule groups and rules; the copy procedure reproduces the rule hierarchy for the target contract.
  • OKC_K_PARTY_ROLES_B — Stores contract party roles (for example lessor, lessee, vendor); role assignments are copied to the new contract.
  • OKC_K_PROCESSES — Stores contract process definitions; these are replicated to preserve workflow and process configuration.
  • OKL_VP_ASSOCIATIONS — Stores vendor program associations that link the contract to vendor program entities; these are copied to maintain program linkage.
  • PLITBLM — A standard Oracle PL/SQL index-by table type used for in-memory collections during processing.

Usage Notes

OKL_VP_COPY_CONTRACT_PVT is a private package and should not be called directly from custom code. The supported entry points are the public packages OKL_VP_COPY_CONTRACT_PUB and its worker OKL_VP_COPY_CONTRACT_PUB_W, which in turn call this private implementation. It is referenced by OKL_VENDOR_PROGRAM_PVT and OKL_VP_CHANGE_REQUEST_PVT, indicating that the copy function is reused by vendor program maintenance and change-request processing flows.

Typical invocation occurs when a user performs a contract copy action from the Vendor Programs form, or when a change request triggers replication of a vendor program contract. In practice, the copy is executed within a transaction managed by the calling public API; callers should follow Oracle's standard API error-handling pattern (checking the returned status and querying the API message stack) rather than issuing direct DML. Because the package relies on OKC and OKL base tables, any customization that alters those tables' required columns or validation rules for the lease module can affect copy behavior; such changes should be tested against the public wrapper. The object is documented with status VALID in ETRM 12.2.2 and is compatible with the 12.1.1 and 12.2.2 code lines.

The metadata confirms five dependent packages reference this object, underscoring that it is a shared internal utility within the vendor program subsystem rather than a standalone feature.