Search Results create_tradein




Overview

OKL_LA_TRADEIN_PVT_W is a PL/SQL package owned by the APPS schema within the Oracle E-Business Suite Lease and Finance Management (OKL) module. The suffix "PVT_W" designates it as a private, wrapper-style API layer generated to expose a logical business entity through Oracle's Rosetta/Java-Forms integration technology, which standardizes the interaction between Java-based middle-tier components and PL/SQL business logic. In this case, the wrapped entity is the trade-in record, an asset or contract item surrendered by a lessee as partial consideration toward a new lease or purchase. The package therefore acts as the technical entry point for creating, and by extension managing, trade-in transactions that flow through the Leasing Agent (OKL_LA) subsystem. It brokers between the declarative, strongly typed PL/SQL record structures defined in OKL_LA_TRADEIN_PVT and the weakly typed JTF collection tables (JTF_NUMBER_TABLE, JTF_VARCHAR2_TABLE_100/200) that Java layers transmit across the JDBC boundary.

Key Procedures and Functions

  • ROSETTA_TABLE_COPY_IN_P6 / ROSETTA_TABLE_COPY_OUT_P6 — These paired routines convert data in both directions between the tradein_tbl_type PL/SQL record structure and four parallel JTF collection arrays (two numeric, one varchar2(200), one numeric). They are the marshalling layer that lets the Java client pass trade-in detail rows into the API and receive results back.
  • ROSETTA_TABLE_COPY_IN_P8 / ROSETTA_TABLE_COPY_OUT_P8 — Equivalent conversion routines for the asset_tbl_type record structure, using two numeric arrays and one varchar2(100) array. They handle the asset-level component of the trade-in payload.
  • CREATE_TRADEIN — The principal business procedure. It accepts an API version, an initialization message-list flag, standard return-status/message-count/message-data out parameters, and a contract header identifier (p_chr_id), together with the trade-in and asset payloads. Two overloads exist: a scalar variant taking individual trade-in attributes and a table variant accepting JTF arrays for bulk processing. Both return generated identifiers and attributes through typed out parameters.
  • DELETE_TRADEIN — Removes a trade-in record, following the same standard API parameter conventions for initialization and error reporting.
  • UPDATE_CONTRACT — Applies updates to the associated contract, allowing trade-in changes to be reflected on the underlying lease or purchase agreement.

Tables Accessed

The documented table reference is PLITBLM, accessed through an APPS synonym. This table supports the trade-in processing flow, storing or staging the trade-in/contract line information that CREATE_TRADEIN and UPDATE_CONTRACT operate against. Because the package is a thin wrapper, most substantive data manipulation is delegated to OKL_LA_TRADEIN_PVT and its underlying OKL transaction tables; PLITBLM represents the directly referenced artifact in the documented metadata.

Usage Notes

This package is not intended for direct invocation by end users or casual custom code. It is a generated wrapper, typically called by Oracle Forms or Java-based Leasing Agent screens when a user enters, modifies, or deletes a trade-in against a lease contract. The Rosetta copy procedures are effectively internal plumbing invoked immediately before and after the business calls. Developers writing custom integrations against trade-in data should prefer the higher-level, public OKL_LA_TRADEIN_PVT APIs, which provide the same functional surface with cleaner, native PL/SQL typing. Where bulk processing is required, the table-based overloads of CREATE_TRADEIN should be used to minimize round trips. All calls return FND-style status values, and callers must inspect x_return_status and the message stack on completion. No other package in the documented set references this wrapper, confirming its role as a leaf-level integration artifact rather than a reusable business service.