Search Results eam_int_exception




Overview

EAM_INT_UTILS is a shared utility package in the Oracle Enterprise Asset Management (EAM) module of Oracle E-Business Suite, documented across releases 12.1.1 and 12.2.2. It is owned by the APPS schema and classified as an OTHER API, meaning it is a supporting infrastructure package rather than a business object API with a public interface contract. Its role is to centralize the cross-cutting chores that every EAM interface program must perform: accumulating validation errors, persisting them to the interface error table, deriving surrogate identifiers from user-entered codes (and the reverse), emitting warnings for irrelevant or redundant columns, and deciding whether a run should be aborted. The package declares AUTHID CURRENT_USER, so unqualified object references resolve against the calling schema while the package body itself remains in APPS.

The header carries a $Header signature of 115.3 dated 2002, indicating the package has been stable since the early 11i era and was carried forward largely unchanged into the 12.x code lines. The earliest visible version identifier in the excerpt shows 115.3; the metadata references a separate EAMINTUSB.pls body file, which is the compiled implementation.

Key Procedures and Functions

The package exposes a compact but highly reusable set of routines. Grouped by purpose:

  • Error accumulation: ADD_ERROR inserts a single message into an in-memory PL/SQL table keyed by interface ID, error type, and message text. RECORD_ERROR and RECORD_INVALID_COLUMN_ERROR are higher-level wrappers that format and stage errors for later persistence. RECORD_IGNORED_COLUMN_WARNING performs the analogous job for non-fatal conditions.
  • Error persistence: LOAD_ERRORS flushes the contents of the in-memory table to the persistent interface error table, taking the source interface table name as its argument so the message can be attributed correctly.
  • Status interrogation: HAS_ERRORS is the function most frequently referenced by callers. It returns a boolean indicating whether any errors have been staged for the current interface run. Downstream code uses it to suppress further processing, skip validation branches, or decide between committing clean rows and rejecting bad ones.
  • Run control: ABORT_REQUEST raises the REQUEST_ABORTED exception, which is bound via PRAGMA EXCEPTION_INIT to the EAM_INT_EXCEPTION constant (-20240). This gives concurrent programs a controlled way to terminate with a recognized error code rather than an unhandled exception.
  • Validation helpers: WARN_IRRELEVANT_COLUMN and WARN_REDUNDANT_COLUMN detect mutually exclusive or duplicative column combinations supplied by the user and register informational messages without failing the run.
  • Identifier resolution: DERIVE_ID_FROM_CODE and DERIVE_CODE_FROM_ID translate between business codes and surrogate primary keys, optionally raising an error when the required value cannot be derived. DEFAULT_IF_NULL supplies a fallback value when an optional column is empty. REQUEST_MATCHES_CONDITION evaluates a caller-supplied predicate.

Tables Accessed

Persistent writes are directed to WIP_INTERFACE_ERRORS, accessed through its APPS synonym. This table is the standard sinking ground for interface validation messages and is shared with Work in Process, which explains why the package reuses its error_type and error columns as declared PL/SQL record types rather than defining a new structure. DBMS_SQL appears in the referenced-object list because several of the derivation routines build and execute dynamic SQL against the caller's interface table, whose name is only known at runtime. PLITBLM is the PL/SQL table memory manager invoked implicitly when the in-memory error_list associative array is manipulated.

Usage Notes

EAM_INT_UTILS is invoked indirectly through the three packages that reference it, which are the actual EAM interface programs delivered for importing assets, work orders, and related data. Those programs call ADD_ERROR or RECORD_ERROR as each interface row is validated, call DERIVE_ID_FROM_CODE when the user has supplied a code instead of an ID, and finally call HAS_ERRORS to branch between the clean and exception paths. LOAD_ERRORS is normally called once per run, after validation has completed and before the program commits or rolls back. Because the package is classified OTHER and is not a supported public API, custom extensions should treat it as internal to EAM: developers writing their own interface programs may reuse it for consistent error handling, but should expect no formal interface guarantee across patches or upgrades.