Search Results validate_accrual_rule




Overview

OKL_GENERATE_ACCRUALS_PUB is the public application programming interface for the Oracle Lease Management (OKL) accrual generation engine within Oracle E-Business Suite. Its principal business function is to create, reverse, and accelerate the revenue and cost accrual entries associated with lease and contract portfolios. Accruals in this context represent the periodic recognition of income or expense that has been earned or incurred but not yet invoiced or billed, and the package provides the mechanism by which the Lease Management application converts contract-level accrual rules into journal-eligible transactions.

The package follows the standard Oracle EBS public/private architecture. OKL_GENERATE_ACCRUALS_PUB exposes a controlled set of entry points to callers while delegating the substantive processing logic to the private package OKL_GENERATE_ACCRUALS_PVT. The public specification declares an API version constant convention and re-exposes the private package's record types through SUBTYPE declarations, most notably accrual_rec_type and acceleration_rec_type. These subtypes allow external callers to populate the same structured accrual and acceleration records that the private layer expects, ensuring interface stability across releases.

The package is classified as a PUB API and is referenced by six other packages in the ETRM data model, confirming that it functions as a shared service layer rather than an application-specific utility. The header of the source specification identifies the package as OKLPACRS.pls and carries a version dated 2008, indicating that the interface has been stable across the 12.1.1 and 12.2.2 releases.

Key Procedures and Functions

The documented API surface exposes the following procedures and functions. Parameter lists are intentionally omitted; only purpose is described.

  • SUBMIT_ACCRUALS — A function that initiates accrual generation for a given accrual date and batch name. It returns a numeric status and populates the standard return status, message count, and message data OUT parameters. This is the primary entry point used to run a bulk accrual cycle.
  • CALCULATE_CNTRCT_REC — A function that accepts a contract header identifier and returns a numeric result. It computes the accrual record for a single contract, supporting contract-level accrual calculation outside of a batch run.
  • VALIDATE_ACCRUAL_RULE — A procedure that validates the accrual rule configuration for a specified contract. It returns a validation result flag along with the standard return status and message outputs, allowing callers to detect misconfiguration before accruals are generated.
  • CATCHUP_ACCRUALS — A procedure that processes catch-up accruals for a contract, using an accrual record as input and returning transaction contract and transaction contract line collection types. A representation type parameter with a default of 'PRIMARY' governs the accounting representation under which the catch-up is recorded.
  • REVERSE_ACCRUALS — A procedure that reverses previously generated accruals for a contract. It accepts an accrual record identifying the accruals to reverse and returns the standard status and message outputs.
  • REVERSE_ALL_ACCRUALS — A procedure that reverses all accruals associated with a contract or accrual set in a single operation, supporting bulk correction, contract termination, or rebooking scenarios. This is the entry point most directly associated with the search term reverse_all_accruals.
  • ACCELERATE_ACCRUALS — A procedure that accelerates accrual recognition, accepting an acceleration record to bring forward accruals that would otherwise be recognized in later periods.

Tables Accessed

The package operates against the following tables through APPS synonyms:

  • OKC_K_HEADERS_B — The contract headers base table. Used to identify and validate contracts, including in CALCULATE_CNTRCT_REC, where the contract identifier is typed against this table's ID column.
  • OKL_K_HEADERS — The Lease Management contract header table, which carries lease-specific attributes and accrual rule references. VALIDATE_ACCRUAL_RULE keys off OKL_K_HEADERS.ID.
  • OKL_TRX_CONTRACTS — The contract transaction table, through which the package writes or reads transaction contract records and line records. The CATCHUP_ACCRUALS procedure returns collection types derived from OKL_TRX_CONTRACTS_PUB, which mirror this table's structure.

Together these tables supply the contract identity, lease attributes, and transaction structure required to compute, post, reverse, and accelerate accrual entries.

Usage Notes

OKL_GENERATE_ACCRUALS_PUB is normally invoked from three contexts. First, Oracle Lease Management concurrent programs call the package during scheduled accrual generation runs, typically entering through SUBMIT_ACCRUALS with a specified accrual date and batch name. Second, Lease Management forms and related UI flows invoke contract-level operations such as VALIDATE_ACCRUAL_RULE, CALCULATE_CNTRCT_REC, CATCHUP_ACCRUALS, and the reversal procedures to support user-initiated corrections and period adjustments. Third, custom integrations and extensions call the public API directly when they need to generate or reverse accruals outside the standard concurrent program flow.

Because the package is classified as a public API and is referenced by other packages, callers should use only the documented entry points and should not call the private package OKL_GENERATE_ACCRUALS_PVT directly. All procedures follow the standard EBS API conventions: an API version parameter, an optional message list initialization flag, and return status, message count, and message data outputs. Callers must inspect x_return_status and, when it indicates error or unexpected status, retrieve messages through the standard message stack utilities before proceeding. REVERSE_ALL_ACCRUALS should be used with care, as it reverses the complete set of accruals for the target contract and is not limited to a single accrual run.