Search Results create_merge_batch




Overview

HZ_MERGE_BATCH_PUB is a public PL/SQL package in the Oracle E-Business Suite Trading Community Architecture (TCA) that manages merge batches used during the party and account deduplication and merge process. A merge batch is a logical container that groups a set of merge operations so that they can be reviewed, committed, or discarded together. The package provides the public API layer through which Oracle EBS forms, concurrent programs, and custom extensions can create and manage these batches programmatically rather than through direct table manipulation.

The package is classified as a PUB (public) API under the APPS schema, meaning it is intended to be called by external code as a supported interface. Internally, the body declares global constants (such as G_PKG_NAME) and private procedures — notably do_create_merge_batch and validate_merge_batch — that perform the actual work while shielding callers from implementation detail. The bulk of the business logic resides in the private layer, with the public API serving as the entry point.

Key Procedures and Functions

The documented public procedure exposed by this package is:

  • CREATE_MERGE_BATCH — Creates a new merge batch record. This is the primary entry point for callers that need to establish a batch to hold one or more party merge operations. It accepts batch-level attributes (such as batch name, commit flag, delete flag, and merge reason code) and returns an output batch identifier along with a return status. The procedure delegates to the private do_create_merge_batch routine, which first invokes validate_merge_batch with a create/update indicator of 'C' before persisting the new batch. The validation step confirms the supplied batch attributes conform to the expected constraints prior to insertion. The x_return_status output parameter communicates success or failure back to the caller, in keeping with the standard TCA API convention.

Tables Accessed

The ETRM metadata for this package does not enumerate specific base tables accessed through APPS synonyms. Functionally, the package operates against the TCA merge batch tables that store batch header information — most directly the HZ_MERGE_BATCH table, which holds the batch identifier, name, commit and delete flags, and merge reason code. These records anchor downstream merge operations to a manageable unit and support the review and commit workflow in the party merge UI. Because batch creation is a lightweight header-insert operation, the package does not directly process the merge transaction detail records themselves; those are handled by related merge and batch-processing packages.

Usage Notes

CREATE_MERGE_BATCH is typically invoked when a user or process needs to open a new merge batch prior to adding parties or accounts to it. In standard EBS usage this occurs through the party merge and deduplication functionality, where the form calls the public API to establish the batch context. Custom code and interfaces should call the PUBLIC procedure rather than the private validation or creation routines, and should always inspect x_return_status to detect failures.

The package is documented as being referenced by zero other packages, indicating that it is a leaf-level API consumed directly by client code rather than a shared internal utility. Callers should treat the batch identifier returned as the handle for all subsequent operations against that batch. The historical header comment (ARHMGBTB.pls, version 115.2) confirms the package has been stable since the early 11i-era architecture and continues to be supported in both 12.1.1 and 12.2.2.