Results for “lock_hist_compare_p”
8 results
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
ARP_CR_HISTORY_PKG is a public PL/SQL package in the Oracle Receivables (AR) module of Oracle E-Business Suite, owned by the APPS schema and defined with AUTHID CURRENT_USER. Its business function is to encapsulate all data access and maintenance operations against the AR_CASH_RECEIPT_HISTORY table, which stores the transaction-level audit trail of a cash receipt. Every state change applied to a receipt — creation, application, unapplication, reversal, clearing, and reconciliation — generates a history row that records the activity, the associated GL date, and the running status of the receipt. This package provides the single, controlled entry point through which Receivables forms, concurrent programs, and dependent APIs create, read, update, delete, and lock those history records.
The package is one of the core low-level infrastructure routines of the Receivables cash management layer, and the metadata confirms it is referenced by 14 other packages, an indication of its central role in the receipt-processing call stack.
Key Procedures and Functions
The package exposes 20 documented procedures. All operate on a record typed as ar_cash_receipt_history%ROWTYPE or on the primary key cash_receipt_history_id, avoiding the need for callers to manipulate columns directly. They fall into five functional families:
- DML operations: INSERT_P inserts a new history row and returns the generated cash_receipt_history_id. UPDATE_P updates an existing history record; two overloads exist, the newer one keyed by cash_receipt_history_id and an older signature retained for backward compatibility. DELETE_P removes a single history row by its identifier, while DELETE_P_CR deletes history records associated with a given cash receipt id. SET_TO_DUMMY populates an OUT record with a fully initialized dummy row, typically to seed a blockless record before a fetch.
- Fetch operations: FETCH_P retrieves a history row by cash_receipt_history_id. FETCH_F_CRID retrieves a history row for a supplied cash receipt id, and FETCH_F_CR_ID fetches using the receipt id carried within the passed record. These routines return the populated %ROWTYPE record to the caller.
- Locking operations: LOCK_P and NOWAITLOCK_P acquire a row lock by history id; LOCK_F_CR_ID and NOWAITLOCK_F_CR_ID lock by cash receipt id; LOCK_F_BATCH_ID and NOWAITLOCK_F_BATCH_ID lock in the context of a batch. LOCK_FETCH_P and NOWAITLOCK_FETCH_P combine a lock with a fetch; LOCK_FETCH_F_CR_ID and NOWAITLOCK_FETCH_F_CR_ID do the same keyed on receipt id. The LOCK_ prefix waits indefinitely, while NOWAITLOCK_ raises an exception immediately if the row is already locked.
- Comparison: LOCK_HIST_COMPARE_P locks and compares history records, supporting concurrency-sensitive update logic.
Tables Accessed
The package operates primarily on AR_CASH_RECEIPT_HISTORY, the base table holding the receipt audit trail, and references the AR_CASH_RECEIPT_HISTORY_S sequence for identifier generation during inserts. Locking and fetch-by-batch logic reference AR_BATCHES to resolve batch membership. Receipt-level operations join to AR_CASH_RECEIPTS to validate and locate the parent receipt. AR_SYSTEM_PARAMETERS is consulted for Receivables system option settings that govern behavior such as date and currency defaults. DUAL is used for simple single-row constructs, consistent with standard PL/SQL practice. All tables are accessed through APPS synonyms.
Usage Notes
ARP_CR_HISTORY_PKG is not intended to be called directly by end users or by arbitrary custom code. It is invoked by Receivables forms — most notably the Cash Receipts workbench — by the AutoLockbox, Post QuickCash, and receipt reversal concurrent programs, and by higher-level Receivables APIs that need to persist history rows. The 14 dependent packages confirm that receipt application and adjustment logic routes through this package rather than issuing direct DML against AR_CASH_RECEIPT_HISTORY, preserving optimistic locking and audit integrity. Customizations should reuse the documented procedures, supply a properly initialized record, honor the NOCOPY parameter conventions, and choose the appropriate LOCK versus NOWAITLOCK variant according to the desired concurrency behavior.