Search Results compute_periodic_payment




Overview

OKL_SIMPLE_PRICING_PVT is a private PL/SQL package body in the Oracle Lease and Finance Management (OKL) module of Oracle E-Business Suite. Its documented purpose is the calculation of lease or loan pricing figures — most notably the periodic payment amount — from a small set of contractual inputs such as term, payment frequency, annual rate, principal (financed amount), residual percentage, and an arrears/advance indicator. The package is classified as PVT (private), meaning it is an internal implementation layer that is not intended to be called directly by external or customer-written code; it exists to support the public pricing APIs and the pricing engines used by the Lease Management application.

The source header (OKLRSPRB.pls 115.27, dated 2003) indicates the package is long-standing core code carried forward across the 11i and R12 code lines, including Oracle EBS 12.1.1 and 12.2.2. The naming convention "SIMPLE_PRICING" distinguishes this routine from the more comprehensive pricing and yield engines used for complex lease structures, confirmations, and multi-stream contracts.

Key Procedures and Functions

  • COMPUTE_PERIODIC_PAYMENT — The single documented function in the package body. It derives the periodic repayment (payment) amount for a contract by applying a standard annuity-style factor. Inputs conceptually include the term, the payment frequency (for example 1, 2, 3, or 12 payments per annum), the periodic rate, the principal amount, the residual percent, and an arrears flag. The function returns the computed payment as a NUMBER and sets an out parameter (x_return_status) to the standard OKL_API return status, so the caller can distinguish success from unexpected error.

Internally, the function normalizes the frequency into periods and payments-per-annum, converts the residual percent to a fraction, computes a per-period interest rate, and evaluates a factor involving the POWER built-in function raised to the number of periods. The arrears/advance decision is implemented by adjusting the exponent (l_periods minus l_Arrears); when the payment is flagged as "Advance" (p_arrears = 'N'), an offset of one is applied so the first payment falls due immediately. The final payment is the principal multiplied by this factor. Errors are trapped by a WHEN OTHERS handler that posts the SQL error to the message stack through Okl_Api.SET_MESSAGE and returns OKL_API.G_RET_STS_UNEXP_ERROR.

Tables Accessed

No database tables are referenced by this package. It is a pure computational routine; all values are supplied by the caller and all results are returned in memory. This makes it lightweight and free of transactional or concurrency concerns.

Usage Notes

Because the package is classified PVT and is referenced by zero other documented packages, it is not part of the supported public API surface. It is reached indirectly through the Lease Management pricing flows, typically when a user defines or recalculates a simple lease contract in the OKL forms, or when a pricing concurrent program or internal engine evaluates payment terms. Developers should use the public OKL pricing APIs rather than calling OKL_SIMPLE_PRICING_PVT directly, since private routines may change across patches and releases. The metadata contains no external callers, so the exact invocation path is best confirmed in the instance's dependency views (for example ALL_DEPENDENCIES) when troubleshooting the "advance power ser" search term.