Search Results delete_p




Overview

ARP_TRANSACTION_HISTORY_PKG is a server-side PL/SQL package owned by the APPS schema in Oracle E-Business Suite Release 12.1.1 and 12.2.2. It encapsulates the create, read, update, and delete logic for the AR_TRANSACTION_HISTORY table in Oracle Receivables. Because the package is declared AUTHID CURRENT_USER, its unqualified references to tables and sequences resolve against the calling schema's privileges rather than the definer's, and it is intended to be called through APPS synonyms such as AR_TRANSACTION_HISTORY and AR_TRANSACTION_HISTORY_S. In the ETRM classification model the package is tagged as OTHER rather than as a supported public API, which means it is an internal repository-access layer used by other Receivables components rather than a documented integration surface. The header comment (ARRITRHS.pls 120.4) indicates the file has been stable since 2005, and the package is referenced by eight other packages, confirming its role as a shared low-level access routine for transaction history records.

Key Procedures and Functions

The package exposes fifteen documented subprograms. They fall into four functional groups.

  • set_to_dummy — initializes an AR_TRANSACTION_HISTORY%ROWTYPE record to placeholder values, typically to clear an OUT record before population.
  • insert_p — inserts a new transaction history row from a supplied record and returns the generated transaction_history_id.
  • update_p — updates an existing transaction history row, addressing it by record and transaction_history_id.
  • delete_p — the routine matched by the user's search. Two overloads exist: one deletes by transaction_history_id, and one deletes by the parent customer_trx_id from RA_CUSTOMER_TRX, removing all history rows associated with a transaction.
  • fetch_p — retrieves a transaction history record by transaction_history_id.
  • fetch_f_trx_id — retrieves a transaction history record keyed by customer_trx_id.
  • lock_p, lock_f_trx_id — acquire a row lock using the standard (waiting) lock mode, by transaction_history_id or by customer_trx_id respectively.
  • nowaitlock_p, nowaitlock_f_trx_id — acquire a row lock in no-wait mode, raising an error immediately if the row is already locked.
  • lock_fetch_p, lock_fetch_f_trx_id — combine locking and retrieval in a single call, by transaction_history_id and by customer_trx_id.
  • nowaitlock_fetch_p, nowaitlock_fetch_f_trx_id — combine no-wait locking with retrieval, again by the two alternate keys.

Tables Accessed

The package reads and writes AR_TRANSACTION_HISTORY, the core table holding audit and status history for Receivables transactions, and obtains its primary key from the sequence AR_TRANSACTION_HISTORY_S. RA_CUSTOMER_TRX is referenced to support the customer_trx_id-keyed overloads of delete_p, fetch_f_trx_id, and the associated lock and lock-fetch routines. AR_SYSTEM_PARAMETERS supplies Receivables system-level configuration, most likely for org or functional defaults applied when records are created, and DUAL is used for trivial value selection. Access is made through APPS synonyms.

Usage Notes

ARP_TRANSACTION_HISTORY_PKG is not a public, customer-facing API. It is normally invoked indirectly by other Receivables packages, Oracle Forms, or concurrent programs that need to record or remove transaction history. The eight packages documented as referencing it are the primary consumers. The presence of lock_p, nowaitlock_p, and lock_fetch variants makes the package suitable for callers that must serialize concurrent access to a history row before updating or deleting it. Custom code should avoid calling delete_p directly unless the calling module also performs the business validations that Receivables applies during transaction maintenance; otherwise history rows required for audit and reporting may be removed out of sequence. Because the package uses AUTHID CURRENT_USER, custom callers must hold the appropriate object privileges on the underlying tables.