Search Results allocate_amount_tradein




Overview

OKL_LA_TRADEIN_PVT is a private (PVT) PL/SQL package in the Oracle Lease and Finance Management (OKL) application, part of the Oracle E-Business Suite 12.1.1 and 12.2.2 codebase. The package name identifies it as belonging to the Lease Application intellectual property, and specifically to trade-in processing logic. In lease origination and restructuring scenarios, trade-in handling allows the value of a customer's existing asset to be applied against a new or amended lease contract. OKL_LA_TRADEIN_PVT encapsulates the business rules that create, adjust, allocate, and remove trade-in amounts associated with lease contract line items.

The package is declared with AUTHID CURRENT_USER and defines its API version (G_API_VERSION) as 1. Its header enumerates a set of global constants inherited from OKL_API, alongside a collection of PL/SQL record and table types used to pass trade-in, asset, and contract line data between its private procedures. These types include tradein_rec_type, asset_rec_type, link_asset_rec_type, and corresponding indexed-by tables. The header revision ($Header: OKLRTRIS.pls 120.2) dates the source to 2006, consistent with the long-standing trade-in architecture in the ETRM stack.

Key Procedures and Functions

The documented procedures and functions of this package comprise eight entries. The core trade-in lifecycle procedures are:

  • CREATE_TRADEIN — Establishes a new trade-in record, associating an asset and its amount with a contract. This is the entry point for introducing trade-in value into a lease.
  • UPDATE_CONTRACT — Applies modifications to a contract in the context of trade-in processing, typically reconciling contract header or line changes triggered by the addition or revision of trade-in value.
  • ALLOCATE_AMOUNT — Distributes a trade-in amount across the applicable contract lines or line items, ensuring the balance is attributed correctly.
  • ALLOCATE_AMOUNT_TRADEIN — The trade-in-specific variant of amount allocation, refining the allocation for trade-in records covered by tradein_rec_type and related collections.
  • DELETE_TRADEIN — Removes a trade-in record when the associated asset is no longer to be credited against the contract.
  • DELETE_CONTRACT — Handles contract deletion and the corresponding cleanup of trade-in associations.

The remaining documented entries support these six core routines. Because the package is classified PVT, the public-facing API layer exposes trade-in functionality to callers; OKL_LA_TRADEIN_PVT should not be invoked directly by external consumers.

Tables Accessed

The package reads and writes through APPS synonyms, touching base tables such as OKC_K_LINES_B and OKC_K_LINES_TL, which hold the lease contract line identifiers and their translatable names that trade-in records reference. OKC_K_HEADERS_B stores contract header information relevant to the UPDATE_CONTRACT and DELETE_CONTRACT paths. OKL_K_HEADERS and OKL_K_LINES store lease-level header and line data, with OKL_K_LINES holding the tradein_amount column that the tradein_rec_type record maps. OKL_TXL_ASSETS_B provides the trade-in asset identifiers used when linking an asset to a trade-in amount. PLITBLM is an Oracle Applications internal table commonly used to bind multiple values into WHERE clauses. A key date model infrastructure is referenced through AK_REGIONS and AK_REGION_ITEMS.

Usage Notes

OKL_LA_TRADEIN_PVT is a private API normally invoked indirectly. In the EBS forms-based lease entry and amendment flows, user actions that add a trade-in asset or adjust its allocated amount ultimately call into this package from the trade-in user interface and its supporting public API. It is also referenced by two other packages, confirming it acts as an internal service layer within the OKL private package family. Custom development should use the supported public API rather than calling OKL_LA_TRADEIN_PVT directly, since the PVT designation signals that signatures and behavior may change between releases. The presence of ALLOCATE_AMOUNT and ALLOCATE_AMOUNT_TRADEIN indicates the package was designed to be re-entrant across repeated allocation or reallocation requests within a single contract maintenance transaction.