Search Results arp_ctl_sum_pkg




Overview

ARP_CTL_SUM_PKG is a public PL/SQL package body owned by the APPS schema in Oracle E-Business Suite releases 12.1.1 and 12.2.2. It is classified under the ETRM repository as an "OTHER" API, meaning it is a supporting utility package rather than a formal public interface or a fully versioned open API. Its business function is to provide aggregated monetary totals for Accounts Receivable transactions, specifically summing transaction line amounts so that downstream processes—such as control total reconciliation, receipt application validation, and invoice-level balancing—can compare expected and recorded values. The package header carries the source identifier ARTUCTLB.pls 115.4 with a last modification date of 10-OCT-2003, indicating it is a long-standing, stable component of the Receivables module that has been carried forward essentially unchanged through the 12.x code line.

Key Procedures and Functions

The package exposes two documented program units: SELECT_SUMMARY and GET_SUMMARY.

  • SELECT_SUMMARY — A public procedure that selects the total transaction, tax, and freight amount for a given transaction. It accepts a customer transaction identifier and a line type as input, and returns output amounts representing the total and the total converted to the functional (reporting) currency. The implementation branches on the line type: when the caller passes the literal value 'ALL', the aggregation spans every line of the transaction; otherwise a filter restricts the sum to the specified line_type. In both branches the underlying extended_amount column is wrapped in NVL and summed with an outer NVL so that a transaction with no qualifying lines yields zero rather than a null. The procedure calls arp_util.debug for diagnostic tracing and re-raises any exception encountered.
  • GET_SUMMARY — The companion routine in the same package, providing summary retrieval for callers that require the computed totals to be returned rather than merely displayed. It shares the same aggregation logic as SELECT_SUMMARY and is the primary entry point used by higher-level Receivables logic that needs invoice-level control totals.

Tables Accessed

The package reads from two Receivables base tables, referenced through APPS synonyms:

  • RA_CUSTOMER_TRX_LINES — The transaction line table from which extended_amount is summed. Filtering is performed on customer_trx_id and, when applicable, on line_type. This is the only table from which amounts are actually aggregated.
  • RA_CUSTOMER_TRX — The transaction header table, documented as a referenced table. It provides the transactional context (transaction number, currency, and related header attributes) that identifies the transaction whose lines are summarized.

The dependency on RA_CUSTOMER_TRX_LINES means performance is sensitive to the indexes on customer_trx_id and line_type, and that totals reflect the committed state of the line records at the time of invocation.

Usage Notes

ARP_CTL_SUM_PKG is invoked primarily as an internal service by other Receivables packages rather than directly by end users. ETRM records indicate the package is referenced by at least one other package in the APPS schema, consistent with its role as a shared aggregation utility. Typical invocation scenarios include:

  • Calling forms and internal validation logic that must verify that transaction line amounts reconcile to a header-level control total before an invoice is completed or posted.
  • Receipt and adjustment workflows that require a rapid, transaction-scoped sum of line amounts without traversing the full distribution or accounting tables.
  • Custom extensions and concurrent programs that need a lightweight API to obtain total, tax, and freight amounts; such code should call GET_SUMMARY or SELECT_SUMMARY with a valid p_customer_trx_id and an appropriate line_type, passing 'ALL' to aggregate across all line types.

Because the package performs no inserts or updates, it is safe to call within read-consistent reporting logic. Callers should nonetheless handle the propagated exceptions, since SELECT_SUMMARY explicitly re-raises any error, and should be aware that debug output is emitted only when the AFLOG_ENABLED profile option permits logging.