Search Results sql_show_error




Overview

EDW_MESSAGE_S is a utility package in the Oracle E-Business Suite APPS schema that provides a centralized mechanism for raising, formatting, and displaying error and informational messages within the Oracle Enterprise Data Warehouse / Business Intelligence System (BIS) product family. It sits alongside the Oracle Application Object Library (FND) message infrastructure and the generic APP_EXCEPTION handler, acting as a wrapper that populates FND_MESSAGE tokens before delegating to the standard exception raiser. The package is primarily intended for internal use by the EDW/BIS codebase and is not classified as a public API, as reflected in its OTHER classification. The header comment $Header: EDWCOMSB.pls 115.4 99/11/01 indicates it is a long-standing component originating in the late 1990s and unchanged in its core behavior through subsequent releases, including 12.1.1 and 12.2.2.

Key Procedures and Functions

  • SQL_ERROR — Constructs and raises an error message for SQL-level failures. It accepts a routine name, a location identifier, and a numeric error code, then loads the BIS message EDW_ALL_SQL_ERROR and populates the ROUTINE, ERR_NUMBER, and SQL_ERR tokens before raising.
  • SQL_SHOW_ERROR — The procedure most relevant to the user's sql_show_error search. It provides the display-oriented counterpart to SQL_ERROR, formatting a SQL error using the same EDW message token model so that it can be surfaced to the user.
  • APP_ERROR — Overloaded to accept a message name alone, a message name with one token/value pair, two token/value pairs, or three token/value pairs. Each overload sets the BIS message by name, conditionally applies tokens, and calls APP_EXCEPTION.RAISE_EXCEPTION.
  • APP_SET_NAME — Sets the current application message name on the FND_MESSAGE stack, establishing the context that subsequent token assignments will use.
  • CLEAR — Resets package state, most notably the internal g_routine and g_location variables, so that a new error context can be established cleanly.

A recurring design pattern is the guarded body IF (g_routine IS NULL) THEN .... This ensures that only the first error encountered in a call stack is recorded and raised, preventing secondary (cascading) errors from masking the original failure. The WHEN OTHERS THEN RAISE exception handler preserves the original error rather than suppressing or replacing it.

Tables Accessed

The package performs no direct reads or writes against application tables or views. All state is held in PL/SQL package variables (g_routine, g_location) and in the FND message stack managed through FND_MESSAGE and APP_EXCEPTION. Consequently, no tables are referenced via APPS synonyms, and no database-level dependencies are recorded.

Usage Notes

EDW_MESSAGE_S is invoked from within EDW/BIS PL/SQL program units and, potentially, from Oracle Forms or concurrent programs that share the EDW error-handling conventions. Because it does not appear in the list of packages referencing other APPS objects, it functions as a leaf dependency, called directly by application code rather than through intermediary wrappers. Typical usage is to call SQL_ERROR or SQL_SHOW_ERROR inside an exception handler when a SQL statement fails, or to call one of the APP_ERROR overloads when a business-rule validation fails. Callers should be aware that the guard variable g_routine suppresses further messages once set; CLEAR must therefore be invoked to re-enable message emission after an error has been handled. Because the package is classified as OTHER and not a published API, custom code should treat it as internal and prefer FND_MESSAGE and APP_EXCEPTION directly where possible, using EDW_MESSAGE_S only in contexts that already depend on BIS conventions.