Search Results get_app_errnum




Overview

JL_ZZ_FA_UTILITIES_PKG is a utility package owned by the APPS schema in Oracle E-Business Suite, classified under the API classification OTHER. It is a custom-style utility library rather than a business API: the package header carries a CUSTOM-style header comment (jlzzsuts.pls 115.1, dated 1999/09/03), which indicates it was created as a site-specific or regional extension used alongside the Oracle Assets (FA) application, most likely within a Japanese localization context given the "JL" prefix and the reference to Fixed Assets.

The package provides a small, focused set of reusable error-handling and transaction-control helpers that other PL/SQL units, Forms libraries, and concurrent programs can call instead of duplicating that logic. Its declared procedures and functions manage error raising, Oracle error propagation, retrieval of application error numbers, and server-side commits. The package is declared with AUTHID CURRENT_USER, meaning that name resolution and privilege checks for referenced database objects are performed against the invoking user's schema and privileges rather than the definer's, which is the standard pattern for utility packages operating under APPS in an 11i/12.x environment.

Key Procedures and Functions

The package exposes four documented procedures and functions:

  • RAISE_ERROR — Retrieves an application code and message and stops execution of the calling program. It accepts an application name, message name, and message type, and uses them to raise a formatted application error, terminating the current routine.
  • RAISE_ORA_ERROR — Retrieves an Oracle error and stops execution of the program. It is used to capture and re-raise native database exceptions in a consistent format.
  • GET_APP_ERRNUM — A function that retrieves the application error number given the application short name and message name. It is declared with PRAGMA RESTRICT_REFERENCES(..., WNDS), meaning it does not write to the database state, so it can be safely called from SQL and from Forms where write-side-effect restrictions apply.
  • DO_COMMIT — Executes a COMMIT at the server side, allowing a commit to be performed from Forms regardless of the trigger in which the action is being executed. This centralizes commit behavior so that Forms code does not need to account for trigger context.

Tables Accessed

The package references two Oracle EBS foundation tables via APPS synonyms:

  • FND_APPLICATION — The application registry, used to resolve an application short name to its internal application identifier. This is required by GET_APP_ERRNUM and RAISE_ERROR to look up messages for a given application.
  • FND_NEW_MESSAGES — The message repository, used to retrieve message text and the associated error number for a given application and message name.

Both tables are read-only from the perspective of this package's documented behavior; no inserts, updates, or deletes are implied by the metadata.

Usage Notes

This package is typically invoked from Oracle Forms (particularly Oracle Assets-related forms and their custom Japanese localization libraries) and from custom PL/SQL procedures or concurrent programs that need uniform error handling and commit control. The ETRM metadata records that it is referenced by four other packages, confirming its role as a shared utility rather than an entry-point API.

With respect to the search term get_app_errnum, this function is the correct entry point when a caller needs the numeric error identifier for a message without retrieving the text itself — for example, to pass an error number into a Forms error handler or to compare against an expected error code. Because it is marked WNDS, it can be called in restricted contexts without violating purity rules. As with any package declared AUTHID CURRENT_USER, callers must ensure they can access FND_APPLICATION and FND_NEW_MESSAGES under their own schema and privileges.