Search Results validate_quote




Overview

OKL_AM_REPURCHASE_ASSET_PVT is a private PL/SQL package body in the Oracle E-Business Suite Lease Management (OKL) module, owned by APPS and classified as a PVT package. It supports asset repurchase processing within the Oracle Enterprise Trading and Risk Management (ETRM) framework, specifically the workflow that allows a lessor or lessee to repurchase a leased asset before or at the conclusion of a lease term. The package acts as a supporting engine behind the public repurchase APIs, encapsulating validations and data manipulation that should not be called directly by external consumers. Its naming convention, with the _PVT suffix, confirms it is an internal helper intended to be invoked from sibling packages or from within the public API layer rather than from customer extensions.

The excerpted header identifies a date of 2007 and version 120.6, indicating this package has been stable across the 12.1.1 and 12.2.2 releases. The source declares SUBTYPE anchors (rulv_rec_type, asset_tbl_type, taiv_rec_type, qpyv_tbl_type) that reuse record structures from okl_rule_pub, okl_am_calculate_quote_pvt, okl_trx_ar_invoices_pub, and okl_quote_parties_pub, demonstrating tight coupling with quote and invoicing logic. Debug logging via fnd_log is embedded throughout, with constants for procedure, exception, and statement levels.

Key Procedures and Functions

The documented public surface consists of two procedures:

  • CREATE_REPURCHASE_QUOTE — Creates the repurchase quote record that drives the asset repurchase transaction. It is the entry point for establishing a new quote for an asset being bought back, populating the quote header and associated attributes.
  • UPDATE_REPURCHASE_QUOTE — Modifies an existing repurchase quote, allowing changes to quote attributes before the repurchase is finalized or processed further.

The excerpt also reveals an internal helper, get_db_values, which retrieves stored database fields for a quote: acceptance flag, quote number, effective-from and effective-to dates, contract header id (khr_id), quote party code (qtp_code), and return status. This helper is not part of the documented public API but illustrates how the package hydrates quote context.

Tables Accessed

The package reads and writes the following tables through APPS synonyms:

  • OKL_TRX_QUOTES_B — The base table storing quote headers; primary target for create and update operations.
  • OKC_K_LINES_B — Contract line base table, linking the repurchase quote to the underlying contract line structure.
  • OKL_ASSET_RETURNS_ALL_B — Asset returns base table, associating repurchased assets with return transactions.
  • DUAL — Used for single-row lookups and date/sysdate retrieval.
  • PLITBLM — PL/SQL integer table type used for bulk/in-memory processing.

Usage Notes

Because this is a PVT package, direct invocation is discouraged. In practice it is called by the three referencing packages that comprise the public repurchase workflow, and indirectly by Lease Management forms and concurrent programs that trigger asset repurchase. A user search for "validate_quote" suggests the intent to confirm whether a quote is valid before repurchase; that validation logic is likely orchestrated through CREATE_REPURCHASE_QUOTE and UPDATE_REPURCHASE_QUOTE combined with the get_db_values helper and quote party data. Custom code should call the corresponding public API (OKL_REPURCHASE_ASSET_PUB or similar) rather than this private package, though DBAs and support engineers may query it for debugging purposes given the embedded FND_LOG instrumentation.