Search Results ar_locking_table




Overview

APPS.OEP_CMERGE_OEPIC is a private helper package body in the Oracle E-Business Suite Order Entry (OE) module, invoked during the Customer Merge process. Its purpose is to reconcile order-entry reference data against the RA_CUSTOMER_MERGES staging table, ensuring that customer-facing identifiers held on order-entry entities are redirected from a duplicate (source) customer or site to the surviving (target) customer or site. The package is tightly coupled to the Oracle Receivables Customer Merge concurrent program, which is the driving process for all table-specific merge workers.

The package name follows the established merge-worker naming convention: OEP_CMERGE_OEPIC, where OEP denotes Order Entry and CMERGE denotes the customer merge framework. It executes in two distinct modes, LOCK and UPDATE, coordinated by the process_mode parameter, so that the merge framework can first serialize access to affected rows and then perform the actual data changes.

Key Procedures and Functions

The package exposes a single documented procedure, MERGE, which is the entry point called by the customer merge framework. Internally it relies on a private routine, OE_PR, responsible for the picking-rule segment of the merge work. OE_PR implements the dual-mode logic described above:

  • LOCK mode — issues a SELECT ... FOR UPDATE NOWAIT against SO_PICKING_RULES for both customer-level and site-level rows identified in RA_CUSTOMER_MERGES. The cursors are opened and immediately closed, which acquires and releases row-level locks, verifying that no conflicting transaction holds the records before the merge proceeds. Progress is reported through ARP_MESSAGE using the message name AR_LOCKING_TABLE and the token TABLE_NAME = SO_PICKING_RULES.
  • UPDATE mode — rewrites SO_PICKING_RULES rows so that site_use_id and related customer identifiers are set to the surviving customer/site values drawn from RA_CUSTOMER_MERGES, while last_update_date, last_updated_by, and last_update_login are stamped using ARP_STANDARD profile values. Progress is reported via AR_UPDATING_TABLE.

Only rows where process_flag = 'N', and where request_id and set_number match the current merge run, are affected, which scopes the work to a single concurrent request and merge set.

Tables Accessed

  • RA_CUSTOMER_MERGES — the Oracle Receivables staging table that maps duplicate (source) customers and sites to their surviving (target) counterparts for a given request_id and set_number. The package reads duplicate_id, duplicate_site_id, customer_site_id, and process_flag from this table to determine which rows require locking or updating.
  • SO_PICKING_RULES — the Order Entry table storing picking-rule definitions at customer and site level. This package both locks and updates its picking_rule, site_use_id, and audit columns so that picking rules follow the surviving customer after the merge completes.

Usage Notes

OEP_CMERGE_OEPIC is not intended for direct invocation by end users or custom code. It is called by the Oracle Receivables Customer Merge concurrent program (and its Order Entry extension) as part of the ordered sequence of merge workers, each responsible for a specific schema object. The framework invokes the worker first in LOCK mode to guarantee that the affected picking-rule rows are not concurrently modified, and then in UPDATE mode to apply the merge.

Because the procedure depends on the request_id, set_number, and process_flag values populated by the merge driver, it must only be run within a valid customer merge run. In EBS 12.1.1 and 12.2.2 the package remains an internal, non-public API; customizations should never call it directly, and any extension of picking-rule handling should instead be implemented through supported customer merge extension points. The reference to AR_LOCKING_TABLE and AR_UPDATING_TABLE confirms the package participates in the standard Receivables merge messaging and logging framework, allowing DBAs to trace progress in the concurrent request log.