Search Results lock_fetch_p




Overview

ARP_CR_ICR_PKG is a PL/SQL package in the Oracle E-Business Suite Receivables (AR) module, owned by the APPS schema and defined with AUTHID CURRENT_USER. Its name reflects its role: it encapsulates database operations for the AR_INTERIM_CASH_RECEIPTS table, the staging table that holds cash receipt records during the Receivables cash application and receipt creation workflow. The package provides a standardized, table-handler style API — a pattern widely used throughout Oracle EBS to isolate direct DML against a base table behind a stable PL/SQL interface. Rather than embedding INSERT, UPDATE, DELETE, and SELECT logic directly in forms or concurrent programs, callers invoke the packaged procedures, which centralize row construction, locking behavior, and primary key handling. The header comment indicates the package body was last shipped in 2002 (115.4), making it a long-standing component of the Receivables codebase. In the context of Oracle EBS 12.1.1 and 12.2.2, this package remains available as a server-side API for programs that must manipulate interim cash receipt rows programmatically.

Key Procedures and Functions

ETRM documents the following procedures, described here without reproducing parameter signatures:

  • SET_TO_DUMMY — Initializes an interim cash receipts record structure to a null or placeholder state, providing a clean starting point for callers before populating real values.
  • INSERT_P — Inserts a new interim cash receipt row. Two overloaded versions exist: one that returns the row identifier and the generated cash receipt identifier, and a second that accepts the record and returns only the cash receipt identifier. The user's search term "insert_p" corresponds to this procedure, which is the primary creation entry point.
  • UPDATE_P — Updates an existing interim cash receipt row, identified by its cash receipt identifier, from a supplied record.
  • DELETE_P — Removes an interim cash receipt row by cash receipt identifier.
  • LOCK_P — Acquires a row lock on a receipt by identifier, using a waiting lock.
  • NOWAITLOCK_P — Acquires a row lock without waiting, allowing callers to detect contention immediately.
  • FETCH_P — Retrieves a receipt row by identifier into an output record.
  • LOCK_FETCH_P — Combines retrieval and locking in a single call using a waiting lock.
  • NOWAITLOCK_FETCH_P — Combines retrieval and locking using a no-wait lock.

Tables Accessed

The package operates primarily on AR_INTERIM_CASH_RECEIPTS, the interim staging table that it inserts, updates, deletes, fetches, and locks. The ETRM metadata also lists AR_CASH_RECEIPTS_S, the sequence used to generate cash receipt identifiers returned by INSERT_P; AR_SYSTEM_PARAMETERS, read for Receivables setup values such as org-level defaults; DBMS_SQL, used for dynamic SQL; and DUAL, used for simple single-row expressions.

Usage Notes

ARP_CR_ICR_PKG is typical of EBS table-handler packages: it is invoked indirectly by Receivables forms, concurrent programs, and workflow processes that stage or validate interim cash receipt data, and it is referenced by one other documented package. Custom code should call these procedures rather than issuing direct DML on AR_INTERIM_CASH_RECEIPTS, so that identifier generation, locking, and record consistency remain centralized. Because the package is declared AUTHID CURRENT_USER, execute privileges and any dependent grants are resolved under the calling schema. The locking variants support multi-user concurrency, and the LOCK_FETCH combinations are preferred when a caller must guarantee row stability between read and update.