Search Results done_merge_rows
Overview
ARP_CMERGE_MASTER is the master orchestration package for the Oracle Receivables customer merge process in Oracle E-Business Suite 12.1.1 and 12.2.2. Customer merge allows an organization to consolidate a duplicate or obsolete customer account into a surviving "to" customer, transferring balances, transactions, receipts, relationships, and dependent records so that the merged-away customer no longer exists as a standalone entity. Because a single merge can touch a large volume of rows across many Receivables, HZ (Trading Community Architecture), and related tables, the merge must be staged, validated, partitioned, and executed in controlled units rather than in one monolithic transaction.
ARP_CMERGE_MASTER provides the procedural backbone for that lifecycle. It is declared with AUTHID CURRENT_USER, and its procedures are invoked by the Customer Merge form and the underlying concurrent programs that drive validation and execution. The package manages a merge request identified by a request ID, records the request, marks the rows eligible for processing, partitions the work for parallel execution, performs the actual merges for customers and products, and cleans up state when the merge completes or is abandoned. The header comment identifies the source file as ARHCMSTS.pls, indicating the package has been through multiple patch levels through 120.6.
Key Procedures and Functions
- ADD_REQUEST — Registers a new merge request in the merge staging tables, associating a request ID with a program name so subsequent processing steps can locate and drive the request.
- MARK_MERGE_ROWS — Marks the candidate rows for a given request based on a process flag, merge rule, priority, and number of merges. This determines the scope of the merge work set.
- VALIDATE_MERGES — Validates the marked rows for a request, identifying conditions that would prevent a merge from being performed. Validation must succeed before execution proceeds.
- PARTITON_MERGE_DATA — Splits the merge work set into partitions and returns the last set number, enabling the merge to be processed in manageable batches.
- UNPARTITON_MERGE_DATA — Reverses partitioning for a specified set number, used when restructuring or unwinding batch divisions.
- MERGE_CUSTOMERS — Executes the customer merge for a given request and set number in the specified process mode, returning a status indicator. This is the core customer consolidation routine.
- MERGE_PRODUCTS — Executes the product-level merge for a request and set number. Overloaded to optionally return an error text, allowing callers to capture failure detail.
- DELETE_ROWS — Removes rows associated with a request and set number, returning status, as part of cleanup or rollback handling.
- DONE_MERGE_ROWS — Finalizes the rows for a request and set number once processing completes successfully.
- CLEAR_ERROR_MERGE_ROWS — Clears error state on merge rows for a request so processing can be retried.
- RESET_MERGE_ROWS — Resets the merge rows for a request and set number to a clean processing state.
- REMOVE_REQUEST — Deletes a merge request and its associated staging data.
- VETO_DELETE — Records a veto against deleting specific rows during the merge, capturing a veto reason and optional partial-delete flag.
- RAISE_EVENTS — Raises workflow events for a merge request, integrating the merge with Oracle Workflow notifications.
- OPERATING_UNIT — Returns the operating unit context under which the merge is executing.
Tables Accessed
The package reads and writes the Receivables merge staging and header tables RA_CUSTOMER_MERGES and RA_CUSTOMER_MERGE_HEADERS, which record merge request state and the rows to be processed. The concurrent process request is tracked in AR_CONC_PROCESS_REQUESTS. Customer master data is handled through the HZ tables HZ_CUST_ACCOUNTS, HZ_CUST_ACCT_RELATE_ALL, HZ_CUST_ACCT_SITES, HZ_CUST_ACCT_SITES_ALL, HZ_CUST_SITE_USES, HZ_CUST_SITE_USES_ALL, and HZ_CUSTOMER_PROFILES. Receipt method references come from RA_CUST_RECEIPT_METHODS, and workflow parameter data from WF_PARAMETER_LIST_T. The package also uses DBMS_SQL for dynamic SQL and PLITBLM as a PL/SQL table helper.
Usage Notes
ARP_CMERGE_MASTER is invoked during the standard Customer Merge flow in Oracle Receivables, typically initiated from the Customer Merge form, which calls ADD_REQUEST to register the merge, followed by MARK_MERGE_ROWS and VALIDATE_MERGES. Once validation succeeds, the concurrent merge programs call PARTITON_MERGE_DATA and then MERGE_CUSTOMERS and MERGE_PRODUCTS for each partition, finishing with DONE_MERGE_ROWS. Custom code should treat this package as an internal implementation layer rather than a public API, since the documented procedures expose the internal state machine of the merge process. Any custom invocation must respect the same ordering of request creation, marking, validation, partitioning, execution, and cleanup, and should account for operating unit context and workflow event raising where applicable.
-
PACKAGE: APPS.ARP_CMERGE_MASTER
12.1.1
-
PACKAGE: APPS.ARP_CMERGE_MASTER
12.2.2
-
PACKAGE BODY: APPS.ARP_CMERGE_MASTER
12.2.2
-
PACKAGE BODY: APPS.ARP_CMERGE_MASTER
12.1.1
-
APPS.ARP_CMERGE_MASTER dependencies on ARP_CMERGE_MASTER
12.2.2
-
APPS.ARP_CMERGE_MASTER dependencies on ARP_CMERGE_MASTER
12.1.1
-
APPS.ARP_CMERGE_MASTER dependencies on ARP_MESSAGE
12.2.2
-
APPS.ARP_CMERGE_MASTER dependencies on ARP_MESSAGE
12.1.1