Search Results default_if_null




Overview

APPS.EAM_INT_UTILS is a utility package body in Oracle E-Business Suite Enterprise Asset Management (EAM). It supports the EAM open-interface processing framework, which loads external asset, work order, and maintenance data into EBS through staging tables. The package provides a reusable set of error-handling, validation, and value-translation routines that other interface programs call during a load run. Its central responsibility is to collect row-level messages in a PL/SQL collection, persist them into interface error tables, and determine whether a run should continue, be aborted, or reported as failed. Because it is classified as OTHER rather than as a set-based API, EAM_INT_UTILS is intended as an internal helper package invoked by EAM interface workers and concurrent programs rather than directly by end users.

Key Procedures and Functions

The package exposes thirteen documented procedures. The core set manages messages:

  • ADD_ERROR — Registers an error against an interface row, populating the interface identifier, error type, and truncated error text in the in-memory error collection.
  • LOAD_ERRORS — Flushes the accumulated error collection to the interface error table using dynamic SQL and DBMS_SQL, looping over each recorded message and binding its values into the insert statement.
  • HAS_ERRORS — Returns whether any errors were recorded, allowing callers to decide between committing, rejecting, or aborting a load.
  • ABORT_REQUEST — Terminates the calling concurrent request when the interface encounters fatal conditions.
  • RECORD_ERROR, RECORD_INVALID_COLUMN_ERROR, and RECORD_IGNORED_COLUMN_WARNING — Convenience wrappers that record errors or warnings associated with specific interface columns, distinguishing fatal column problems from ignorable ones.

A second group performs column and value validation:

  • WARN_REDUNDANT_COLUMN — Raises a warning when a column supplied in the interface data is redundant or unnecessary for the load, allowing processing to continue while still surfacing the condition to the user.
  • WARN_IRRELEVANT_COLUMN — Issues a warning when a column is not relevant to the given interface context.
  • REQUEST_MATCHES_CONDITION — Evaluates whether the current request satisfies a supplied condition, supporting conditional processing and validation logic.

A third group provides data-translation helpers widely used across interfaces:

  • DERIVE_ID_FROM_CODE — Resolves an internal identifier from a user-entered code value.
  • DERIVE_CODE_FROM_ID — Performs the inverse translation, returning the code for a known identifier.
  • DEFAULT_IF_NULL — Substitutes a default value when an input is null, simplifying interface defaulting rules.

Tables Accessed

The principal persistent table referenced is WIP_INTERFACE_ERRORS, accessed through its APPS synonym. This table stores interface error rows (interface identifier, error type, message text, and standard WHO audit columns). LOAD_ERRORS inserts into it dynamically, binding the source interface table name as a variable—an approach noted in the source as change 4247057—so the insert can be restricted to rows matching the current interface identifier. DBMS_SQL is used as the dynamic SQL engine for parsing, binding, executing, and closing the insert cursor. PLITBLM is referenced as the underlying collection type supporting the in-memory error array. Standard audit columns such as created_by, last_update_login, and last_updated_by are carried from the source interface record.

Usage Notes

EAM_INT_UTILS is invoked programmatically from EAM interface packages and worker logic, typically within concurrent programs that process staged asset or work order data. The package is referenced by three other packages, confirming its role as a shared utility layer. A typical flow is: validate each interface row using the DERIVE_* and DEFAULT_IF_NULL helpers; record problems through RECORD_ERROR, RECORD_INVALID_COLUMN_ERROR, RECORD_IGNORED_COLUMN_WARNING, WARN_REDUNDANT_COLUMN, or WARN_IRRELEVANT_COLUMN; check HAS_ERRORS; call LOAD_ERRORS to persist messages to WIP_INTERFACE_ERRORS; and invoke ABORT_REQUEST only when the run cannot proceed. Because LOAD_ERRORS builds SQL dynamically, callers must pass a valid source interface table name. The package is not intended for direct invocation from forms or reports; custom code should treat it as an internal EAM interface utility and preserve its message-recording contract.