Search Results okl_trans_contracts_pvt




Overview

OKL_TRANS_CONTRACTS_PVT is a private (PVT) PL/SQL package body owned by APPS within the Oracle Lease and Finance Management (OLFM) module of Oracle E-Business Suite. It provides the internal implementation layer for creating, maintaining, and removing transaction-level contracts and their associated contract lines, operating within the Oracle Contracts (OKC) and Oracle Leasing (OKL) data model. Because it is classified as a private API, it is not intended for direct external invocation; instead it is called by the public transaction-contract APIs, ETRM (Enterprise Transaction and Reference Management) flows, and other dependent packages. The package encapsulates the business rules governing transaction contracts, including amount validation, currency handling, and distribution of accounting references, ensuring data integrity between the transaction contract header, its lines, and the underlying pricing and accounting structures. The header comment dates the source to release 12.0.4 lineage, and it remains present in 12.1.1 and 12.2.2 file systems.

Key Procedures and Functions

The package exposes six documented public procedures, plus helper constructs used internally.

  • CREATE_TRX_CONTRACTS — Creates a transaction contract record. It accepts an API version, message-list initialization flag, standard return status and message outputs, a transaction contract record, and a transaction contract line table, returning the populated transaction contract and line collections. Internally it handles multi-currency, pulling functional currency and currency conversion attributes.
  • CREATE_TRX_CNTRCT_LINES — Creates the individual lines belonging to a transaction contract.
  • UPDATE_TRX_CONTRACTS — Modifies an existing transaction contract header.
  • UPDATE_TRX_CNTRCT_LINES — Modifies existing transaction contract lines.
  • DELETE_TRX_CONTRACTS — Removes a transaction contract header.
  • DELETE_TRX_CNTRCT_LINES — Removes transaction contract lines.

An internal cursor, get_contract_number, resolves the contract number from OKC_K_HEADERS_B given a header ID. A private procedure, Validate_Amount, verifies that the sum of transaction line amounts does not exceed the transaction amount, returning an error status otherwise.

Tables Accessed

  • OKC_K_HEADERS_B — Read to retrieve the contract number via the get_contract_number cursor.
  • OKL_TRX_CONTRACTS — Primary transaction contract header store; reads and writes.
  • OKL_TXL_CNTRCT_LNS — Transaction contract lines; summed during amount validation and maintained by line procedures.
  • OKL_K_HEADERS — Currency conversion type, rate, and date attributes.
  • OKL_TRNS_ACC_DSTRS — Transaction accounting distributions.
  • OKL_TRX_TYPES_TL — Transaction type descriptions.
  • PLITBLM — Standard message table for API error/status messaging.

Usage Notes

As a PVT API, OKL_TRANS_CONTRACTS_PVT is invoked indirectly through the public transaction contract APIs, OLFM forms, and concurrent programs that process transaction contracts and their lines. Custom code should call the corresponding public wrapper rather than this package directly. It is referenced by three other packages, confirming its role as an internal service layer. Callers must supply the standard API parameters (p_api_version, p_init_msg_list, x_return_status, x_msg_count, x_msg_data) and honor OKL_API return status conventions. Amount validation should be respected so that line totals never exceed the transaction amount.