Search Results lock_p




Overview

ARP_CR_BATCHES_PKG is a private PL/SQL package body owned by APPS in the Oracle E-Business Suite Receivables (AR) module. It implements the core data-access layer for the AR_BATCHES entity, the table that stores automatic receipt creation batches, their control totals, and processing status. The package encapsulates the full CRUD and concurrency-control lifecycle for batch records: insertion, update, deletion, locking, and fetching. Because it exposes both locking and nowait-locking variants alongside matching fetch variants, it is designed to serve interactive Oracle Forms clients (which typically require optimistic or immediate locking) as well as batch and concurrent processing (which require selective locking). In the 12.1.1 and 12.2.2 releases the package body carries the header revision marker 120.8.12010000.2, indicating a relatively stable interface maintained through the 12.1.3 / 12.2 upgrade cycle.

Key Procedures and Functions

  • SET_TO_DUMMY — Resets package-level global variables to sentinel/"dummy" values (documented constants include AR_TEXT_DUMMY, AR_FLAG_DUMMY, AR_NUMBER_DUMMY, and AR_DATE_DUMMY). These sentinels are compared during update and lock operations to detect whether a column value was actually supplied by the caller.
  • INSERT_P — Inserts a new row into AR_BATCHES and returns the generated batch identifier to the caller. This is the primary creation entry point for automatic receipt batches.
  • UPDATE_P — Updates an existing AR_BATCHES row using the supplied record, applying dummy-value comparison logic to avoid overwriting columns the caller did not intend to change.
  • DELETE_P — Removes a batch row from AR_BATCHES.
  • LOCK_P — Acquires a row-level lock on a batch record, waiting if necessary, to serialize concurrent modification. This is the procedure most commonly referenced by the search term lock_p.
  • NOWAITLOCK_P — Acquires the same row-level lock but returns immediately rather than waiting, allowing the caller to detect contention and decide whether to retry or inform the user.
  • FETCH_P — Retrieves a batch record from AR_BATCHES without locking it.
  • LOCK_FETCH_P — Combines locking and retrieval in a single call, returning the record with a held lock.
  • NOWAITLOCK_FETCH_P — Combines nowait locking and retrieval, used when the caller must know instantly whether the row is available.

Tables Accessed

The package reads and writes AR_BATCHES, the primary transactional store for receipt batches, and its companion table AR_BATCHES_S, which holds translated/descriptive (TL-style) attribute columns. It consults AR_SYSTEM_PARAMETERS to obtain Receivables setup values that govern batch behavior, including the set of books context referenced by the package global pg_set_of_books_id. DBMS_SQL is used for dynamic cursor construction, permitting the parsed update cursor to be cached in the package global pg_cursor1 for reuse without reparsing. DUAL supplies scalar values and date conversions, notably the Julian-day sentinel used by the dummy-date constant.

Usage Notes

ARP_CR_BATCHES_PKG is an OTHER-classified, internal-style API rather than a formally published open interface. It is referenced by nine other packages in the Receivables schema, which rely on its locking and fetch primitives to maintain batch integrity. Typical invocation paths include Oracle Forms used for receipt batch entry and review, concurrent programs that create or process automatic receipt batches, and custom extensions that must manipulate batch rows in a manner consistent with the seeded application. Callers should observe two conventions: WHO-audit columns are populated from ARP_GLOBAL package globals (program, request, and login identifiers), and the dummy sentinel constants must be honored when updating records so that unchanged columns are left null or untouched. Because row locking is explicit, applications should keep lock-to-commit windows short to minimize contention on AR_BATCHES.