Search Results ar_cons_inv




Overview

ARP_CMERGE_ARCON is the customer merge sub-package responsible for updating the AR Consolidated Invoices table, AR_CONS_INV, during the Oracle Receivables customer merge process. When two customer records are merged, consolidated billing invoices already generated for the duplicate customer must be reassigned to the surviving (merge-to) customer and its bill-to site. ARP_CMERGE_ARCON performs this reassignment, ensuring that the consolidated invoice history remains consistent with the merged customer and site relationships. The package body header indicates a last revision of 120.11, dated 30-OCT-2005, and it is classified as a supporting utility rather than a public API. Note that the user search term "ar_cons_inv" corresponds directly to the primary table manipulated by this package; the package's internal cursor and PL/SQL associative array types are defined against AR_CONS_INV columns such as cons_inv_id, customer_id, and site_use_id.

Key Procedures and Functions

The documented ETRM metadata lists a single entry point, MERGE. Internally, the package body defines a private driver routine, ar_cin, which accepts a request identifier, a set number, and a process mode, and performs the actual column-level update logic. The MERGE procedure is the externally visible interface invoked by the customer merge framework. Because the ETRM metadata does not publish a detailed parameter list for MERGE and the parameter lists for internal routines must not be invented, the procedure should be understood conceptually: it receives merge context (request and set identifiers) and, for the duplicate customer and duplicate site identified in the merge headers, locates the affected AR_CONS_INV rows and repoints their customer_id and site_use_id to the surviving customer and site. When invoked with a LOCK process mode, the package bypasses message and audit-log setup and simply locks the target rows in preparation for the merge.

Tables Accessed

Documented table references, resolved through APPS synonyms, are AR_CONS_INV, RA_CUSTOMER_MERGE_HEADERS, RA_CUSTOMER_MERGES, HZ_CUSTOMER_MERGE_LOG, HZ_CUSTOMER_MERGE_LOG_S, and PLITBLM. AR_CONS_INV is the principal target table; it holds consolidated invoice headers and is the object updated by ar_cin. RA_CUSTOMER_MERGE_HEADERS stores the merge set and header identifiers used to scope the run, while RA_CUSTOMER_MERGES supplies the duplicate-to-surviving customer and site mapping used in the cursor join. HZ_CUSTOMER_MERGE_LOG and its sequence HZ_CUSTOMER_MERGE_LOG_S receive audit entries capturing the before and after values of the reassigned columns, supporting the audit trail controlled by the HZ_AUDIT_ACCT_MERGE profile option. PLITBLM is the standard Receivables PL/SQL Table List Manager table, used here for intermediate primary key lists.

Usage Notes

ARP_CMERGE_ARCON is invoked indirectly by the Oracle Receivables Customer Merge concurrent program, running under the merge framework alongside sibling sub-packages that each own a portion of the customer data model. The MERGE procedure is called once per processing set, with the request identifier and set number passed from the merge driver; the LOCK mode is used in the locking phase to serialize the affected consolidated invoices. The package also calls HZ_ACCT_MERGE_UTIL.load_set to prime the set of identifiers and reports progress through ARP_MESSAGE with the AR_UPDATING_TABLE token. Because it is a private implementation package, it should not be invoked from custom code or forms; customizations requiring consolidated invoice reassignment should drive the official Customer Merge program instead. Two behavioral points are relevant for administrators: the update is guarded by the process_flag of 'N' on RA_CUSTOMER_MERGES, meaning already-processed merge rows are skipped, and audit logging depends on the HZ_AUDIT_ACCT_MERGE profile option being enabled.