Search Results insert_request




Overview

The APPS.OKL_CREDIT_MEMO_PUB package body is a public (PUB-classified) Oracle Lease Management API within Oracle E-Business Suite Release 12.1.1 and 12.2.2. Its business purpose is to create and register credit memo requests against lease contracts, enabling users and external processes to issue credits that offset amounts owed, apply adjustments, or correct billing for an existing lease. The package exposes a thin public wrapper layer above the private implementation package OKL_CREDIT_MEMO_PVT, which performs the actual validation and persistence logic. All public entry points follow the standard EBS API conventions, accepting p_api_version and p_init_msg_list as control parameters and returning the standard x_return_status, x_msg_count, and x_msg_data message-stack outputs alongside business-specific OUT parameters.

Key Procedures and Functions

  • INSERT_REQUEST — The primary documented procedure and the object most commonly associated with the search term "insert_request." It creates a credit memo request record. Its parameter profile includes the API version, initialization flag, a transaction line detail identifier (p_tld_id), the credit amount, an optional credit style identifier, a credit description, a credit date defaulting to the system date, an optional transaction identifier, a transaction source, and a source transaction number. It returns the generated transaction identifier (x_tai_id) plus a transaction record (x_taiv_rec) and the standard return status, message count, and message data. Internally it opens a SAVEPOINT named insert_request for partial rollback, delegates to OKL_CREDIT_MEMO_PVT.insert_request, and translates the private return status into OKL_API.G_EXCEPTION_ERROR or OKL_API.G_EXCEPTION_UNEXPECTED_ERROR as appropriate.
  • INSERT_ON_ACC_CM_REQUEST — A companion documented procedure that supports creation of an on-account credit memo request, a variant used when the credit is not tied to a specific pre-identified transaction line in the same manner as the standard request.

The package body contains four documented procedures and functions in total, with the remaining two serving internal supporting roles. The public body itself performs minimal logic beyond argument forwarding, exception mapping, and message propagation, which is consistent with the layering convention used throughout the OKL module.

Tables Accessed

The ETRM metadata does not enumerate specific base tables for this package. Through its private counterpart, the API operates on the OKL transaction and credit memo staging structures that hold the generated transaction identifier (tai_id) and the associated transaction record type (taiv_rec_type). The returned x_tai_id and x_taiv_rec values confirm that the package writes into the transaction header and transaction line detail tables used by Lease Management billing and credit processing.

Usage Notes

OKL_CREDIT_MEMO_PUB.INSERT_REQUEST is typically invoked from the Lease Management credit memo entry forms, from concurrent programs that generate credits in batch, and from custom PL/SQL integrations that need to inject credit requests into the leasing transaction stream. Because the procedure manages its own SAVEPOINT and raises named exceptions, callers should wrap the invocation in an exception handler that checks x_return_status and enumerates the message stack through OKL_API or FND_MSG_PUB utilities. The package is referenced by three other packages, indicating reuse across credit, billing, and integration flows; callers should therefore respect the API version and initialization conventions rather than manipulating the underlying tables directly.