Search Results okl_internal_billing_pvt




Overview

OKL_INTERNAL_BILLING_PVT is a private (PVT-classified) PL/SQL package body in the APPS schema that supports Oracle E-Business Suite Lease Management (OKL/ETRM) internal billing operations. Its responsibility is the creation and maintenance of internal billing transactions generated against lease contracts, including the derivation and storage of the associated accounting distributions. The package operates beneath the public lease APIs and serves as the internal engine that translates contract, stream, and transaction-type data into receivable invoice and invoice line records.

The package is an integral component of the accounting and billing sublayer of Lease Management. It interacts with several sibling private packages, notably OKL_ACCOUNT_DIST_PVT, OKL_ACCOUNT_DIST_PUB, OKL_ACCOUNTING_UTIL, OKL_TIL_PVT, OKL_TXD_AR_LN_DTLS_B processing, and OKL_EXECUTE_FORMULA_PVT, indicating that internal billing depends on formula execution for amount derivation and on the accounting distribution framework for revenue, tax, and accrual assignment. It also references OKL_API and OKL_DEBUG_PUB for standardized error handling and debug logging, and FND_API / FND_MSG_PUB for the EBS API error stack. The package body is marked VALID and is not referenced by any database object, confirming it is invoked exclusively through PL/SQL call paths rather than by triggers or views.

Key Procedures and Functions

  • CREATE_BILLING_TRX — Creates the internal billing transaction. This is the central entry point that assembles invoice header and line data and persists it to the receivable invoice tables.
  • GET_INVOICE_FORMAT — Resolves the invoice format applicable to the billing transaction, drawing on invoice format, invoice type, and stream type setup.
  • UPDATE_MANUAL_INVOICE — Applies changes to a manually entered internal invoice, allowing user-maintained invoice data to be synchronized with the lease transaction records.
  • DELETE_MANUAL_INVOICE — Removes a manually entered internal invoice and its dependent lines.
  • CREATE_ACCOUNTING_DIST — Generates the accounting distribution rows for the billing transaction, delegating to the accounting distribution private package and accounting utility routines.

Tables Accessed

The package reads and writes the core Lease Management transaction tables: OKL_TRX_AR_INVOICES_B (invoice headers), OKL_TXL_AR_INV_LNS_B (invoice lines), and OKL_TXD_AR_LN_DTLS_B (invoice line details). Setup and reference data are drawn from OKL_INVOICE_FORMATS_V, OKL_INVOICE_TYPES_V, OKL_INVC_FRMT_STRMS_V, OKL_INVC_LINE_TYPES_V, OKL_STRM_TYPE_V, and OKL_TRX_TYPES_V. Contract context is sourced from OKC_K_HEADERS_B/V, OKC_K_PARTY_ROLES_B, OKC_RULES_B, OKC_RULE_GROUPS_B, OKC_RG_PARTY_ROLES, OKL_K_HEADERS_FULL_V, and OKL_K_HEADERS_V. Receivables reference data includes AR_RECEIPT_CLASSES, AR_RECEIPT_METHODS, RA_CUST_RECEIPT_METHODS, RA_TERMS_B, RA_TERMS_TL, OKX_RCPT_METHOD_ACCOUNTS_V, OKX_CUST_TRX_TYPES_V, and OKX_CUST_SITE_USES_V. Customer profile and currency context come from HZ_CUSTOMER_PROFILES and FND_CURRENCIES.

Usage Notes

OKL_INTERNAL_BILLING_PVT is documented as being referenced by 17 other packaged objects and is itself dependent on numerous OKL and OKC APIs. It is therefore invoked indirectly through higher-level Lease Management public APIs and concurrent programs rather than called by end users directly. Internal billing is typically triggered when lease streams become due and the billing process generates receivable invoices; the procedures here perform the transaction creation and accounting distribution steps within that flow. Custom extensions should call the public wrapper APIs rather than this private package, since the PVT classification signals that signatures are not guaranteed across patch levels.