Search Results reverse_entries




Overview

The OKL_REVERSAL_PVT_W package is a public wrapper in the Oracle E-Business Suite (EBS) Oracle Lease Management (OKL) module. It exposes reversal functionality for accounting and transaction entries originating from lease contracts, providing a controlled interface through which downstream or upstream processes can reverse previously generated entries. The package is declared with AUTHID CURRENT_USER, meaning its stored procedures execute with the privileges of the invoking schema rather than the definer, which is the standard pattern for EBS public API wrappers that must respect the calling session's security context.

The "_W" suffix conventionally identifies this as a wrapper package that bridges PL/SQL callers to an underlying private implementation (OKL_REVERSAL_PVT). This architecture keeps the core reversal logic encapsulated while providing a stable, supported entry point. The documented API classification is "OTHER," indicating it is not designated as a formal Open Interface or public API but remains referenced within the application code base, evidenced by its inclusion in dependency tracking (referenced by one other package).

Key Procedures and Functions

The package exposes four documented program units:

  • REVERSE_ENTRIES — The primary business procedure, which appears in two overloaded forms. The first handles a single source record identified by a numeric source ID and a source table name, together with an accounting date. The second accepts a collection of source IDs (a JTF_NUMBER_TABLE) plus a table name and accounting date, enabling bulk reversal in a single call. Both variants follow the standard EBS API convention of accepting an API version and initialization message flag, and returning the standard return status, message count, and message data out parameters for error and diagnostic reporting. Parameter lists are not reproduced here beyond what the metadata documents.
  • ROSETTA_TABLE_COPY_IN_P0 — A helper procedure that copies data into the package's internal source ID table type from a JTF_NUMBER_TABLE. This supports the PL/SQL-to-Java or layered table transfer pattern ("Rosetta" conversions) used to pass collections across language or invocation boundaries.
  • ROSETTA_TABLE_COPY_OUT_P0 — The inverse helper, copying the internal source ID table type back out into a JTF_NUMBER_TABLE for consumption by the caller.
  • ROSETTA_TABLE_COPY_IN_P0 / OUT_P0 — Together these two routines manage the marshaling of the numeric ID collections required by the bulk REVERSE_ENTRIES variant.

Note that while four program units are counted, REVERSE_ENTRIES is overloaded; the metadata lists the two Rosetta helpers and the reverse entry points together.

Tables Accessed

The only documented table reference is PLITBLM, accessed via an APPS synonym. PLITBLM is the standard EBS "PL/SQL Interface Table for Blob/Message" table, commonly used as a temporary staging area for passing structured collection data between PL/SQL layers and supporting the table-copy (Rosetta) mechanism described above. The reversal procedures themselves operate on the source tables named at runtime through the p_source_table parameter, which directs processing to the appropriate lease accounting tables; the specific target tables are resolved dynamically rather than statically referenced in this wrapper.

Usage Notes

OKL_REVERSAL_PVT_W is typically invoked programmatically rather than from a user interface. It is called by other OKL packages, concurrent programs performing accounting adjustments or period-close corrections, and custom extensions that require reversal of lease-generated entries. Callers should invoke REVERSE_ENTRIES within an initialized message stack, supplying a valid API version and, when desired, initializing the message list, then inspect X_RETURN_STATUS for success or error and process X_MSG_COUNT/X_MSG_DATA accordingly. The bulk overload is preferred for high-volume reversals to reduce round trips. Because the package runs with invoker's rights, callers must possess the necessary privileges on the underlying OKL tables. The 2005 header revision indicates the wrapper has remained stable across 12.1.1 and 12.2.2, with behavior consistent in both release lines.