Search Results max_buffered_rows




Overview

ARW_SEARCH_CUSTOMERS is an Oracle Receivables framework package body owned by APPS that supports the customer and account-site search functionality exposed through the Receivables customer user interface and related self-service flows. Its principal responsibility is to populate the global temporary table AR_CUST_SEARCH_GT with a hierarchically flattened result set of customers, account sites, and site uses, then to expose that buffered result set through cursor-based search APIs. The package therefore sits between the search entry points presented to users and the underlying TCA (Trading Community Architecture) tables HZ_CUST_ACCOUNTS, HZ_CUST_ACCT_SITES, HZ_CUST_SITE_USES, HZ_PARTY_SITES, HZ_PARTIES, and HZ_LOCATIONS.

The header comment identifies the source as ARWCUSRB.pls and places the package within the Receivables customer search subsystem. A global constant named MAX_BUFFERED_ROWS is initialized from the profile option VO_MAX_FETCH_SIZE, defaulting to 200, which reflects a bugfix that limits the volume of rows buffered during a search. This design buffers results once and then allows repeated navigation without re-querying the base tables.

Key Procedures and Functions

The package exposes six documented program units:

  • SEARCH_CUSTOMERS — Orchestrates customer search, driving the population of the search results and returning the cursor or result set consumed by the calling form.
  • ARI_SEARCH — Provides the internal search implementation that applies filter criteria against the buffered data.
  • INITIALIZE_ACCOUNT_SITES — Initializes the account-site level of the buffered hierarchy, establishing the address and site-use rows associated with a selected customer.
  • INIT_ACCT_SITES_ANON_LOGIN — Performs the equivalent initialization for anonymous (unauthenticated) login scenarios, where a reduced set of account sites is presented.
  • UPDATE_ACCOUNT_SITES — Applies changes to the buffered account-site records, such as selection flags or site-use assignments, before the user confirms the operation.
  • INSERT_ACCT_SITE_USES — Persists new site-use relationships. This is the procedure most directly associated with the search term insert_acct_site_uses, and it writes the site-use rows derived from the user's selection in the account-site layer into the persistent TCA structures.

The internal cursor cust_cur illustrates the structure produced for the search layer: it unions a synthetic customer-level row (DETAILS_LEVEL 'CUST', address_id -1, site_uses null) with account-site rows (DETAILS_LEVEL 'ADDR') that carry the formatted address from ARP_ADDR_PKG.FORMAT_ADDRESS, the site-use description from ARI_UTILITIES.GET_SITE_USES, and the location from ARI_UTILITIES.GET_SITE_USE_LOCATION. This two-level shape is what INSERT_ACCT_SITE_USES consumes when writing site uses.

Tables Accessed

The package reads from HZ_CUST_ACCOUNTS and HZ_PARTIES to resolve the customer account and party name, HZ_CUST_ACCT_SITES and HZ_PARTY_SITES to resolve account sites and their addresses, HZ_LOCATIONS for address components, and AR_CUST_SEARCH_GT as the global temporary buffer that holds the flattened search results. Site-use values are read through the ARI_UTILITIES helper, which draws on HZ_CUST_SITE_USES. Persistence operations performed by INSERT_ACCT_SITE_USES and UPDATE_ACCOUNT_SITES write to HZ_CUST_SITE_USES and related intersection tables such as AR_IREC_USER_ACCT_SITES_ALL. Supporting references include FND_USER for user context and profile lookups, FND_PROFILE for VO_MAX_FETCH_SIZE, and RA_CUSTOMER_TRX for transactions associated with the customer. PLITBLM and SCORE appear as auxiliary references.

Usage Notes

ARW_SEARCH_CUSTOMERS is invoked indirectly from the Receivables customer search and account-site maintenance user interfaces, and from iReceivables self-service pages that call INIT_ACCT_SITES_ANON_LOGIN for unauthenticated sessions. Because it manipulates the global temporary table AR_CUST_SEARCH_GT, callers must invoke the initialization and search routines before UPDATE_ACCOUNT_SITES or INSERT_ACCT_SITE_USES, since those routines operate against the buffered context established earlier in the same session. The package is referenced by one other package within Receivables, and it calls ARI_UTILITIES, ARP_ADDR_PKG, FND_PROFILE, and FND_USER as dependencies. Custom code should treat these procedures as internal framework APIs rather than supported public interfaces, and should not assume stability of parameter lists across releases. Direct DML against HZ_CUST_SITE_USES is inadvisable; the supported path is through this package or the corresponding TCA public APIs.