Search Results dml_record_type




Overview

APPS.HZ_IMP_LOAD_STAGE2 is a PL/SQL package that forms part of the Oracle E-Business Suite Trading Community Architecture (TCA) bulk import infrastructure, commonly known as the Customer Interface or Party Import process. The package operates as a "Stage 2" processor, meaning it executes downstream of the initial staging and staging-table population logic handled by complementary packages in the HZ_IMP family. Its principal business function is to move validated and staged party, address, contact, and contact-point records from the interface staging tables into the operational TCA registry tables, while simultaneously performing duplicate detection, error capture, and work-unit bookkeeping.

The package is declared with AUTHID CURRENT_USER, indicating that it executes with the privileges of the invoking schema rather than the definer, which is consistent with the APPS-level concurrent processing model where worker programs are launched under the responsible application user. The header commentary retains a historical type definition, DML_RECORD_TYPE, which groups the runtime control parameters (batch identifier, operating source, rerun flag, error limit, batch mode flag, audit columns, and flexfield/security options) into a single record structure. Although this type is commented out in the shipped source, it documents the conceptual parameter bundle that governs a single import batch.

Key Procedures and Functions

The package exposes two documented procedures:

  • WORKER_PROCESS — The primary worker routine responsible for executing an individual import batch. It accepts the batch identifier, the actual content source, rerun and batch-mode flags, the error limit, user and audit identifiers, general messaging tokens (character, numeric, and date), flexfield validation and data-security options, and profile version. It also accepts parameters governing what-if analysis and registry deduplication, including a deduplication match rule identifier. The procedure returns the standard concurrent manager error buffer (Errbuf) and return code (Retcode) outputs. Notably, the system date parameter is passed as a VARCHAR2 rather than a DATE field, a change introduced to address defect 3932987.
  • ERROR_LIMIT_HANDLING — A supporting routine that evaluates the errors accumulated for a given batch against the configured batch mode flag and error limit, determining whether processing should continue, halt, or be marked complete. It takes the batch identifier and batch mode flag as inputs.

Tables Accessed

The package reads and writes the core HZ_IMP interface tables. HZ_IMP_BATCH_SUMMARY and HZ_IMP_BATCH_DETAILS store batch-level and record-level status; HZ_IMP_PARTIES_SG, HZ_IMP_ADDRESSES_SG, HZ_IMP_CONTACTS_SG, and HZ_IMP_CONTACTPTS_SG are the staging tables for parties, locations, contacts, and contact points respectively. HZ_IMP_DUP_PARTIES and HZ_IMP_DUP_DETAILS support duplicate-party detection, while HZ_IMP_ERRORS_S and HZ_IMP_TMP_ERRORS capture validation and load failures. HZ_IMP_WORK_UNITS tracks parallel work distribution, and DUAL is used for scalar queries.

Usage Notes

HZ_IMP_LOAD_STAGE2 is not typically invoked directly by end users. It is called by the Customer Interface concurrent programs (such as the Party Import and its worker children), which spawn parallel worker requests during a batch import. It is referenced by one other package documented in the TCA import stack, reflecting its role as a downstream consumer rather than a top-level entry point. Custom code should invoke WORKER_PROCESS only through the standard concurrent program registration, observing the retcode and errbuf outputs to detect failures, and should avoid direct DML against the underlying staging tables.