Search Results okl_execute_formula_pvt




Overview

OKL_FORMULAEVALUATE_PUB is the public application programming interface for the Oracle Lease and Finance Management (OKL) formula evaluation engine in Oracle E-Business Suite 12.1.1 and 12.2.2. The package exposes functionality that evaluates the formulae attached to lease contracts and contract lines, retrieving the parameter values required by a formula and then computing the resulting function values. In ETRM terminology a formula (stored in OKL_FORMULAE) is composed of functions whose inputs are context parameters drawn from the contract header or contract line. This package is the externally callable entry point to that calculation logic; the substantive implementation resides in the companion private package OKL_FORMULAEVALUATE_PVT, which supplies the shared data types consumed by this API.

The package is declared with AUTHID CURRENT_USER and carries the standard OKL/OKC API conventions: an API version parameter, an initialization flag defaulted to OKC_API.G_FALSE, and the standard return status, message count, and message data OUT parameters. It also declares the conventional error tokens (G_UNEXPECTED_ERROR, G_SQLERRM_TOKEN, G_SQLCODE_TOKEN) and the exception G_EXCEPTION_HALT_PROCESSING, together with the package name constant derived from OKL_API.G_APP_NAME.

Key Procedures and Functions

  • EVA_GetParameterValues — Retrieves the set of context parameter values required to evaluate a given formula. It accepts a formula identifier and a contract identifier (and optionally a contract line identifier) and returns a collection of type ctxparameter_tbl. This procedure is the lookup stage of formula evaluation, gathering the header- and line-level inputs that the formula references.
  • EVA_GetFunctionValue — Performs the actual evaluation. It accepts the formula identifier, contract identifier, line identifier, and the previously retrieved context parameter collection, and returns a collection of type function_tbl containing the computed results. This procedure is the calculation stage and depends on the parameter table produced by EVA_GetParameterValues.

The function_tbl subtype is declared by reference to OKL_FORMULAEVALUATE_PVT.function_tbl, as is ctxparameter_tbl, confirming that the public package is a thin, type-preserving facade over the private implementation. The term "function_tbl" that surfaced in the search refers to this subtype used for the OUT collection of EVA_GetFunctionValue rather than to a standalone database object.

Tables Accessed

The package metadata records no directly referenced tables under APPS synonyms. Working through the API signatures, the identifiers passed by callers originate from the OKL formula, contract header, and contract line views — notably OKL_FORMULAE_V, OKL_K_HEADERS_V, and OKL_K_LINES_V, whose ID column types are used to declare the p_fma_id, p_contract_id, and p_line_id parameters. The underlying reads of formula definitions, contract attributes, and line attributes occur through the private package and the OKL entity objects that back these views. No direct DML is documented against application tables by this public layer.

Usage Notes

OKL_FORMULAEVALUATE_PUB is invoked internally by the leasing calculation and pricing flows when a contract or contract line must be evaluated against its assigned formula. It is also reachable from Oracle Forms-based ETRM screens that display calculated contract values, and from concurrent programs that process contract portfolios in batch. Custom integrations call the two procedures in sequence: EVA_GetParameterValues is executed first to obtain the ctxparameter_tbl for the contract context, and the returned collection is passed to EVA_GetFunctionValue to obtain the function_tbl of results. Callers must supply a valid p_api_version, honor p_init_msg_list, and inspect x_return_status and the message stack before consuming the OUT collections. Because the package is classified as PUB and referenced by three other packages, its signature is treated as a stable integration contract; extensions should be made through the private package rather than by altering these entry points.