Search Results process_mass_rebook




Overview

OKL_MASS_REBOOK_PUB is the public API package for the Oracle Lease and Finance Management (OKL) mass rebook process. Rebooking is the accounting event that transfers a contract's remaining net book value from one depreciation book to another, typically when an asset is reclassified, a lease is restructured, or the corporate accounting policy for a book set changes. When this must be performed for a large population of contracts — for example, an entire book being retired — the mass rebook feature lets users define selection criteria once and process all qualifying contracts in a single batch.

The package is classified as a public (PUB) API in the APPS schema, meaning it is intended for external invocation by concurrent programs, forms, and customer extensions. It follows the standard EBS API contract, opening with OKC_API.START_ACTIVITY to create a savepoint, validate API version compatibility, and initialize the message list, then returning x_return_status, x_msg_count, and x_msg_data to the caller. The package exposes its procedure signature through global constants G_PKG_NAME and G_API_TYPE ('_PUB') in keeping with EBS API conventions.

Key Procedures and Functions

  • BUILD_AND_GET_CONTRACTS — Uses dynamic SQL to evaluate user-supplied selection criteria stored in OKL_MASS_RBK_CRITERIA for a given REQUEST_NAME, populating the OKL_RBK_SELECTED_CONTRACT staging table and returning the selected contract list and a count of rebookable contracts.
  • PROCESS_MASS_REBOOK — The primary driver procedure; orchestrates the overall mass rebooking run against the contract set produced by selection.
  • APPLY_MASS_REBOOK — Applies the computed rebook accounting entries to the affected contracts.
  • UPDATE_MASS_RBK_CONTRACT — Maintains the per-contract status and results within the mass rebook staging structures as each contract is processed.
  • MASS_REBOOK_AFTER_YIELD — Handles rebooking where the contract has already undergone a yield adjustment, ensuring book values are recalculated in the correct sequence.

Six other packages reference this package, confirming its role as a shared service within the leasing module.

Tables Accessed

  • OKL_MASS_RBK_CRITERIA — Stores the selection criteria keyed by REQUEST_NAME. The package reads these rows to determine which contracts qualify for the run and to identify the source and target books.
  • FA_BOOKS — Provides the depreciation book definitions required to map contracts between source and destination books during rebooking.

Additional internal OKL tables, such as OKL_RBK_SELECTED_CONTRACT, are referenced for staging selected contracts.

Usage Notes

OKL_MASS_REBOOK_PUB is normally invoked indirectly through the Mass Rebook concurrent program in Oracle Lease Management. The program accepts a request name that links to pre-defined criteria in OKL_MASS_RBK_CRITERIA, calls BUILD_AND_GET_CONTRACTS to gather the population, then invokes PROCESS_MASS_REBOOK and APPLY_MASS_REBOOK to execute and post the accounting. Calls should always verify x_return_status against OKC_API.G_RET_STS_SUCCESS and inspect the message stack for diagnostic detail, as dynamic SQL failures surface through the message list rather than via exceptions alone.