Search Results invoke_pricing_engine




Overview

OKL_GENERATE_STREAMS_PUB is the public API package for the Oracle Lease and Finance Management (OLFM/OKL) module in Oracle E-Business Suite Release 12.1.1 and 12.2.2. Its principal business function is the generation of billing streams for lease and finance contracts. In OKL, a "stream" represents a scheduled series of financial transactions — such as billings, payments, or accruals — derived from a contract's pricing, payment terms, and accounting rules. This package provides the externally callable entry points that allow other Oracle EBS modules, forms, and custom integrations to trigger stream generation programmatically, rather than through the standard contract authoring UI.

The package follows the standard EBS public API architecture: a thin public wrapper (OKL_GENERATE_STREAMS_PUB) that validates the API context via OKL_API.START_ACTIVITY and END_ACTIVITY, and a private implementation package (Okl_Generate_Streams_Pvt) that performs the actual business logic. This separation enforces consistent error handling, message stacking, and API versioning conventions across the OKL schema.

Key Procedures and Functions

  • GENERATE_STREAMS — The primary documented procedure. It accepts a contract header identifier, a generation context code, and standard API control parameters (API version, message list initialization flag), returning transaction number, transaction status, return status, message count, and message data to the caller. It delegates processing to Okl_Generate_Streams_Pvt.generate_streams and translates internal return codes into the standard G_RET_STS_SUCCESS, G_RET_STS_ERROR, and G_RET_STS_UNEXP_ERROR exceptions.
  • POPULATE_HEADER_DATA — A documented procedure used to populate the header-level data structures required before stream generation can proceed. It prepares contract header attributes that the generation engine consumes, ensuring the calling context has the necessary identifying and descriptive information in place.
  • INVOKE_PRICING_ENGINE — A documented procedure that calls the pricing engine to compute or refresh pricing for the contract associated with the stream generation request. Pricing results drive the amounts and terms of the generated streams.

Tables Accessed

The ETRM metadata documents referenced tables through APPS synonyms but does not enumerate them explicitly in the excerpt. Based on the OKL data model, the package operates primarily against the OKL contract header and stream tables, including OKL_K_HEADERS (contract headers keyed by KHR_ID), the stream definition and stream line tables that store generated billing schedules, and pricing-related tables consumed by the pricing engine invocation. The KHR_ID parameter passed into GENERATE_STREAMS is the join key to these header records. The POPULATE_HEADER_DATA routine writes to in-memory or temporary header structures rather than to persistent base tables, while the generation logic persists stream rows.

Usage Notes

This package is typically invoked from the Lease Management contract forms during stream generation actions, from concurrent programs that batch-generate streams across contracts, and from custom PL/SQL integrations that need to trigger generation outside the standard UI. Callers must pass a valid OKL contract header identifier and an appropriate generation context code indicating the business scenario. Because the public wrapper raises standard exceptions on unexpected errors, calling code should wrap invocations in exception handlers and inspect x_return_status and x_msg_data. The package is referenced by at least one other OKL package, indicating internal reuse. API version 1 is the sole supported version in the documented release.