Search Results flag_error




Overview

APPS.HZ_IMP_LOAD_FINREPORTS_PKG is a PL/SQL package body that supports the Oracle EBS Trading Community / Customer Data Management import framework. Its specific business purpose is to load and validate incoming financial report records for a party (customer or organization) as part of the bulk import process. Financial reports describe a party's reported financial standing — annual reports, trial balances, audited statements, and similar documents — and are held against the party record. This package receives staged rows from interface tables and applies the validation and transformation logic needed before writing them into the base financial reports entity.

The name convention ("HZ_IMP_..." with a "_PKG" suffix) places it firmly within the HZ import infrastructure, the same family of objects used by the Customer Interface and the Trading Community import programs. The header comment references an AR-family source file (ARHLFNRB.pls version 120.5), reflecting the historical convergence of receivables customer import utilities into the HZ import schema.

Key Procedures and Functions

The documented package exposes one procedure:

  • LOAD_FINREPORTS — The single entry point that performs the load of financial report interface rows into the destination financial reports structure. It drives the record-by-record processing loop, invoking the package's internal validation logic and, where validation succeeds, performing the insert or update against the base financial reports table. Rows that fail validation or DML are diverted so they can be logged rather than causing the whole load to abort.

Although not separately documented, the package body declares a substantial set of local variables that reveal its internal design: strongly-typed variables for each financial report attribute (PARENT_PARTY_ID, FR_ID, PARTY_ID, AUDIT_IND, CONSOLIDATED_IND, ESTIMATED_IND, FINAL_IND, FISCAL_IND, FORECAST_IND, OPENING_IND, PROFORMA_IND, QUALIFIED_IND, RESTATED_IND, SIGNED_BY_PRINCIPALS_IND, TRIAL_BALANCE_IND, UNBALANCED_IND, TYPE_OF_FINANCIAL_REPORT, and the date and period fields). Every flag-style attribute is paired with a companion variable of the FLAG_ERROR type, used to capture per-column validation outcomes. A single l_exception_exists FLAG_ERROR variable tracks whether any row failed, so downstream processing can react without re-inspecting every validation array. The package also carries a debug counter (g_debug_count).

Tables Accessed

  • HZ_IMP_FINREPORTS_INT — The primary interface table supplying staged financial report rows for loading.
  • HZ_IMP_FINREPORTS_SG — The staging/surrogate table used by the import framework to hold intermediate financial report data.
  • HZ_FINANCIAL_REPORTS — The destination base table into which validated financial reports are inserted or updated.
  • HZ_IMP_ERRORS / HZ_IMP_ERRORS_S — Error capture tables where validation and DML failures are recorded for later review.
  • HZ_IMP_TMP_ERRORS — Temporary error staging used during processing.
  • HZ_IMP_ADDRESSES_INT — Referenced in the context of the party import, linking financial reports to staged address/party data.
  • HZ_ORIG_SYS_REFERENCES — The origin system reference table that records source-system keys for imported entities.
  • DUAL — Utility selects within PL/SQL logic.
  • PLITBLM — The PL/SQL table of type definitions used by the bulk-processing constructs.

Usage Notes

This package is not intended for direct interactive invocation. It is called by the EBS import runtime — typically the Customer Interface / Trading Community import concurrent program chain — after rows have been staged into the HZ import interface tables. The documented metadata shows it is referenced by one other package, indicating it acts as a lower-level worker invoked by a controlling import driver rather than by forms directly.

Because it participates in bulk data import, correct behavior depends on the interface tables being populated and on validation data (lookups, party identifiers) being present. The "flag_error" search term is significant here: the package relies heavily on per-column FLAG_ERROR variables and a row-level l_exception_exists flag to distinguish clean rows from rejected ones, ensuring that only valid financial reports are promoted to HZ_FINANCIAL_REPORTS while errors are written to the HZ_IMP_ERRORS tables for the standard import error report.