Search Results okl_csbrw_pvt




Overview

The APPS.OKL_CSBRW_PVT package is a private (internal) PL/SQL API belonging to the Oracle Lease and Finance Management (OKL) application module of Oracle E-Business Suite. Its name — "CSBRW" — aligns with the OKL customer/contract balances review family of objects, and the package is declared with AUTHID CURRENT_USER, meaning it executes with the privileges of the invoking schema rather than the defining schema. This is typical of ETRM helper packages that must honor the calling session's security context when querying shared subledger data.

The package embodies a small, focused set of global constants, global variables, and a single public function. The header reveals extensive use of message and token constants — G_FND_APP, G_REQUIRED_VALUE, G_INVALID_VALUE, G_COL_NAME_TOKEN, G_COL_NAME1_TOKEN, G_COL_NAME2_TOKEN, G_PARENT_TABLE_TOKEN, G_UNEXPECTED_ERROR, G_SQLERRM_TOKEN, and G_SQLCODE_TOKEN — indicating that the routine participates in EBS's standard error-handling and message-substitution framework (FND_MSG_PUB and OKL_API). The token g_col_name2_token, the search term that surfaced this object, is one of the placeholders used when composing dynamic SQL or error messages where up to three column names must be injected into a formatted message. The global exception G_EXCEPTION_HALT_VALIDATION signals that failures are expected to abort validation cleanly rather than allow partially-validated data to proceed.

Key Procedures and Functions

  • CUST_AMOUNT_INFO — The sole documented function. It accepts an API version, an initialization-message flag (defaulting to Okc_Api.G_FALSE), a message count and message data out parameter for the EBS standard messaging protocol, and a customer account identifier. It returns a VARCHAR2 status and outputs two amounts: x_amnt_applied and x_amnt_outstanding. The function therefore computes, for a given customer account, how much of that customer's receivables has been applied (paid or credited) and how much remains open — a receivables balance snapshot used by OKL contract and billing review logic. Parameter lists are not reproduced here beyond the documented signature.

Tables Accessed

The ETRM metadata documents four base tables, all in the Oracle Receivables schema and accessed through APPS synonyms:

  • AR_CASH_RECEIPTS_ALL — Supplies the receipt header records against which applied amounts are measured.
  • AR_PAYMENT_SCHEDULES_ALL — The principal source for outstanding balances; each row represents an installment, and its open amount drives x_amnt_outstanding.
  • AR_RECEIVABLE_APPLICATIONS_ALL — Provides the application records that link receipts to transactions, supplying the applied amount aggregation.
  • RA_CUSTOMER_TRX_ALL — Identifies the customer transactions belonging to the account so that only that customer's receivables are included.

Reads dominate; the function is an inquiry-style routine rather than a transactional API.

Usage Notes

Because OKL_CSBRW_PVT is classified as a PVT package and is referenced by zero other documented packages, it is not a public integration point. It is intended for internal OKL use — typically invoked by OKL forms, concurrent programs, or other OKL private packages that need a customer-level applied/outstanding balance without calling the heavier public AR APIs. The presence of the FND message tokens and the G_EXCEPTION_HALT_VALIDATION exception indicates it is called during validation flows, where a negative result should halt processing. Customizations should call the public OKL or AR APIs rather than this package, and any direct invocation must respect the AUTHID CURRENT_USER semantics by ensuring the calling schema has the necessary grants on the AR tables and OKL objects. Database version differences between 12.1.1 and 12.2.2 do not alter the documented signature, but sites should verify the object exists and is valid after any patch or upgrade that touches the OKL Receivables integration layer.