Results for “compute_periodic_payment”

8 results




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

OKL_SIMPLE_PRICING_PVT is a private PL/SQL package in the Oracle E-Business Suite (EBS) Lease Management (OKL) module, the component of Oracle ETRM that governs contract origination, pricing, and lifecycle processing. The package is declared with AUTHID CURRENT_USER and resides in the APPS schema, but its _PVT suffix confirms that it is an internal implementation package. It is not intended as a public API surface; rather, it encapsulates the calculation logic that underpins simple pricing methods for lease contracts. In release 12.1.1 and 12.2.2 the package remains a private pricing utility within the OKL pricing subsystem.

The central business function is the computation of periodic lease payments from a defined set of financial inputs. Pricing is a foundational activity in lease origination: the periodic payment drives payment schedules, accounting entries, accruals, and residual valuation. By isolating this arithmetic into a private package, Oracle allows the public pricing APIs and the contract entry forms to delegate payment calculation without exposing the internal formula directly to external callers.

Key Procedures and Functions

The package exposes exactly one documented function, COMPUTE_PERIODIC_PAYMENT. This function returns the calculated periodic payment amount for a lease or loan-style contract. Based on the package metadata and standard lease mathematics, it accepts parameters describing the term of the contract, the payment frequency, the interest or discount rate, the financed principal, an optional residual percentage, and an arrears indicator that determines whether payments occur at the beginning or end of each period. It also returns a standard EBS return status out-parameter, x_return_status, which follows Oracle's established API convention of signalling FND_API.G_RET_STS_SUCCESS or failure so that calling code can branch on the outcome.

No other procedures or functions are documented in the package specification. All supporting computation and exception handling is therefore internal to the body, or supplied by the public pricing layer that invokes this function.

Tables Accessed

The documentation records no direct table references for OKL_SIMPLE_PRICING_PVT. This is consistent with its design as a pure computational utility: the inputs required for payment calculation are passed as scalar parameters rather than being read from contract tables. Consequently, the function performs no DML and is not a source of direct table contention or locking. Any persistence of the resulting payment amount against a contract line is the responsibility of the calling public API, not of this private package. This parameter-driven design also makes the function deterministic with respect to its inputs and therefore straightforward to unit test in isolation.

Usage Notes

Because it is a PVT package, OKL_SIMPLE_PRICING_PVT should not be called directly from customer extensions. The supported entry point is the public OKL pricing API layer, which validates contract context and then delegates the arithmetic to this function. In practice the package is reached during contract authoring and repricing in the Lease Management forms, and from concurrent or batch processes that recalculate payment streams. Custom code should invoke the public API rather than this private function, since private package signatures can change between patch levels without notice.

The constant G_UNEXPECTED_ERROR is assigned the value 'OKL_CONTRACTS_UNEXP_ERROR'. This is the message token surfaced through the standard OKL error-handling and message-dictionary mechanism whenever the function raises an unexpected exception. Users or developers searching for okl_contracts_unexp_error are therefore typically looking at an error propagated from this package or a sibling in the OKL pricing and contract stack — for example, an invalid parameter such as a zero or negative term, a null rate, or a divide-by-zero condition in the payment formula. Diagnosing the error begins with the accompanying SQLCODE and SQLERRM tokens, which the package defines as G_SQLCODE_TOKEN and G_SQLERRM_TOKEN and substitutes into the message at runtime to preserve the underlying Oracle error. In 12.2.2 the same private classification applies, and the recommended response is to enable OKL API logging, capture the SQLCODE and SQLERRM context, and verify the pricing inputs passed by the calling public API.