Search Results terminate_contract




Overview

The APPS.OKL_VP_TERMINATE_PUB package body is the public application programming interface for the contract termination process within Oracle Enterprise Asset Management (EAM) and the Oracle Contracts (OKL) module. In the Oracle E-Business Suite 12.1.1 and 12.2.2 releases, this package serves as the externally callable wrapper that exposes the internal termination logic implemented in OKL_VP_TERMINATE_PVT. The VP component of the name identifies the package as belonging to the contract versioning and processing family of OKL APIs, while the _PUB suffix denotes that the package is classified as a public API intended for consumption by other Oracle modules, forms, and customer extensions.

The primary business purpose of this package is to provide a controlled, message-enabled entry point for terminating an existing contract. Callers supply a termination header record describing the contract and the effective termination details, and the package coordinates validation, message stack management, and error propagation on behalf of the caller.

Key Procedures and Functions

  • terminate_contract — The single documented public procedure in this package body. It accepts an API version, an initialization flag, a termination header record, and returns the standard Oracle API output parameters consisting of return status, message count, and message data. Internally, the procedure copies the inbound header record into a local variable and delegates to OKL_VP_TERMINATE_PVT.terminate_contract, which contains the substantive termination processing. Based on the status returned by the private API, the wrapper raises either FND_API.G_EXC_ERROR or FND_API.G_EXC_UNEXPECTED_ERROR, ensuring that callers receive a consistent exception contract.
  • Exception handling — While not a public procedure in its own right, the exception section of terminate_contract is functionally significant. It intercepts the standard FND_API exceptions, translates them into the corresponding return status values, and invokes FND_MSG_PUB.Count_and_get to preserve the SQL and application error messages on the message stack for the calling program.

Tables Accessed

The ETRM metadata for this object does not enumerate a direct list of tables referenced through APPS synonyms. The OKL_VP_TERMINATE_PUB wrapper is a thin delegation layer; all database access occurs within OKL_VP_TERMINATE_PVT, which updates the contract header and associated termination records. The wrapper itself operates only on in-memory records and the FND message stack, and does not perform direct DML.

Usage Notes

This package is typically invoked when a contract must be terminated prior to its natural expiration, whether through the Oracle Contracts user interface or through programmatic integration. The procedure is called by one other documented package, indicating that it is itself wrapped by higher-level processing. Oracle recommends that custom code invoke OKL_VP_TERMINATE_PUB.terminate_contract rather than the private package, because the public wrapper enforces the API version check, initializes the message list when requested, and guarantees that error conditions are surfaced through FND_API return status values. Callers should always inspect x_return_status and drain the message stack via FND_MSG_PUB before proceeding, since the procedure intentionally uses exception propagation internally and only communicates failure through the output parameters.