Search Results okl_contract




Overview

The APPS.OKL_AM_LEASE_LOAN_TRMNT_PUB package is the public termination API for the Oracle Lease and Finance Management (OKL) module within Oracle E-Business Suite. Its documented purpose is to execute partial or full termination of a lease or loan contract. The package is classified as a PUB API in ETRM 12.2.2, meaning it is a supported, externally callable interface rather than an internal implementation detail. It carries the ETRM metadata annotation @rep:category BUSINESS_ENTITY OKL_CONTRACT, confirming its scope as a contract-lifecycle component of the OKL product. The package header is defined with AUTHID CURRENT_USER, so it executes with the privileges of the calling user. Its business role is tightly bounded: when a lease or loan agreement must be ended—whether entirely or for a subset of the contract—this API performs the validation and termination logic on behalf of the calling application, form, or concurrent process. Users searching under the term "okl_contract" are typically looking for exactly this class of OKL contract-management entry points.

Key Procedures and Functions

The ETRM metadata documents three procedures or functions in total, of which two are named in the excerpt:

  • VALIDATE_CONTRACT — Validates a contract prior to termination. The header excerpt shows it accepts an API version, an initialize-message-list flag, a contract identifier, and a control flag, and returns the contract status together with the standard return status, message count, and message data outputs. Its purpose is to determine whether a given lease or loan contract is eligible for the requested termination before any data is changed.
  • LEASE_LOAN_TERMINATION — Performs the actual partial or full termination of the lease or loan contract. This is the principal business procedure of the package and is the operation that accomplishes the contract-ending action described in the package's ETRM annotation.
  • A third documented procedure or function is present in the package metadata but is not enumerated in the excerpt; it forms part of the same public surface.

The package also declares a global exception, G_EXCEPTION_HALT_VALIDATION, which signals that validation processing must stop, and exposes subtype aliases (tcnv_rec_type, tcnv_tbl_type, term_rec_type, term_tbl_type) inherited from the private package OKL_AM_LEASE_LOAN_TRMNT_PVT, allowing callers to pass structured termination and conversion data.

Tables Accessed

The documented table reference recorded in ETRM 12.2.2 is PLITBLM, accessed through an APPS synonym. This is the standard Oracle error-message and message-stack table used by the Oracle Applications message dictionary; the package references it to record and retrieve validation and error text through the OKC/OKL message-handling framework. Because the excerpt is an API specification rather than a body listing, the underlying termination, contract-status, and accounting tables modified by the procedure are not enumerated in the metadata and are handled in the private package layer.

Usage Notes

The package is invoked by nine other packaged objects according to the ETRM call graph, indicating that it is a shared service on which downstream OKL processes depend, rather than a standalone utility. In typical EBS deployments it is called from the Lease and Finance Management contract termination forms, from concurrent programs that process terminations in batch, and from custom PL/SQL code that must programmatically end a lease or loan agreement. Callers should invoke VALIDATE_CONTRACT first and respect the returned status and message stack before proceeding to termination. Standard OKC/OKL API conventions apply: the p_init_msg_list flag controls message-stack initialization, and callers must check x_return_status, x_msg_count, and x_msg_data after every call. As an AUTHID CURRENT_USER package, calling session privileges must include the necessary OKL table and synonym grants. Because the header carries a 2008 revision date and the package remains active and supported in both 12.1.1 and 12.2.2, it should be treated as a stable, forward-compatible integration point for contract termination.