Search Results gms_output




Overview

GMS_ERROR_PKG is the central error-handling, messaging, and diagnostic utility package for the Oracle EBS Grants Management (GMS) module. It provides a standardized mechanism through which Grants Management PL/SQL APIs, concurrent programs, and forms-based processes report errors, raise exceptions, substitute runtime values into message tokens, and emit debug output. The package is declared with AUTHID CURRENT_USER, so it executes with the privileges of the calling schema rather than the APPS schema, allowing it to be invoked safely across the module's integration points. Because the same package is referenced by 25 other packages, it functions as a shared infrastructure component rather than a standalone business API: it does not itself create awards, budgets, or invoices, but it governs how every other GMS process communicates success, expected errors, and unexpected failures to the user or to the concurrent manager log.

Key Procedures and Functions

The package exposes six documented procedures, each serving a distinct diagnostic or reporting role.

  • GMS_MESSAGE — The primary message-generation routine. It accepts an error message name together with up to five token name/value pairs, resolves the message through the Oracle message dictionary, substitutes the token values, and returns the fully formed text. It also returns an error code that distinguishes success, an unexpected error, and an expected error. An execution-type argument controls whether the message is written to the concurrent program log (FND_FILE.log) or retained in a PL/SQL table for interactive retrieval.
  • GMS_DEBUG — Emits a debug message, with the execution-type argument again determining whether output goes to the concurrent log or to the interactive PL/SQL table. It supports controlled tracing of package execution during development and production troubleshooting.
  • GMS_EXCEPTION_HEAD_PROC — Added under Bug 1744641 to generate header-level errors when an exception occurs during invoice or revenue generation. It accepts the name of the calling process so that the failure can be attributed to the correct origin.
  • GMS_EXCEPTION_LINES_PROC — The line-level counterpart to the header routine. It accepts an exception message, token values, the calling place, and optional context including project ID, award number, award name, SQL code, and SQL message, producing a detailed record of the failing transaction line.
  • GMS_OUTPUT — Writes output through the package's standard output mechanism. This is the procedure most directly associated with the search term gms_output, and is used to display or persist diagnostic text generated during processing.
  • SET_DEBUG_CONTEXT — Establishes the debug context that governs whether and how GMS_DEBUG and GMS_OUTPUT emit information during a session or concurrent run.

Tables Accessed

The ETRM metadata documents no direct table references for this package through APPS synonyms. This is consistent with its design: message text and token definitions are resolved through the Oracle Application Object Library message dictionary rather than through Grants Management base tables. Where the exception procedures record award or project context, those values are supplied by the caller as parameters rather than read directly, keeping GMS_ERROR_PKG free of data-model dependencies and safe to call from any GMS process.

Usage Notes

GMS_ERROR_PKG is invoked indirectly far more often than directly. Grants Management APIs and concurrent programs call GMS_MESSAGE when they need to return a formatted, translatable error to the user; they call the exception head and line procedures inside exception handlers that surround invoice and revenue generation. Interactive forms invoke the package with the interactive execution type so that messages accumulate in the PL/SQL table and can be displayed on the form, while concurrent programs pass the concurrent execution type and route output to the request log. Custom extensions that wrap standard GMS APIs should follow the same convention, calling GMS_MESSAGE for user-facing errors, the exception procedures to capture unexpected failures with award context, and SET_DEBUG_CONTEXT with GMS_DEBUG or GMS_OUTPUT for tracing. Because the package is referenced by 25 other packages, changes to its behavior carry broad regression risk, and developers should treat it as a frozen shared utility rather than a candidate for modification.