Search Results jg_utility_pkg




Overview

APPS.JG_UTILITY_PKG is a lightweight PL/SQL utility package shipped as part of the Oracle E-Business Suite Globalization (JG) product family. Its documented package body header shows a ship date of 2002/11/18 and a history entry crediting Kai Pigg with creation on 30-12-1998, indicating it is a long-standing component that has remained stable across multiple EBS releases, including 12.1.1 and 12.2.2. The package is classified under the ETRM "OTHER" API category, which denotes that it is not a formal public application programming interface but rather an internal helper library.

The business function of JG_UTILITY_PKG is to provide a standardized logging and diagnostic output layer for concurrent programs and client-driven processes. Rather than requiring every globalization routine to call the Oracle Reports/Concurrent Manager file utilities directly, the package wraps FND_FILE.PUT_LINE into a small, consistent set of procedures. This ensures that diagnostic information, execution traces, and user-visible messages all follow the same convention and are routed to the correct destination file (output file versus log file).

Key Procedures and Functions

  • OUT — Writes a single line of text to the concurrent program output file using FND_FILE.PUT_LINE(FND_FILE.OUTPUT, line). The documentation explicitly notes that this output is intended for display to the end user via the client tool, meaning it becomes part of the report or log report content.
  • LOG — Writes a line of text to the concurrent program log file via FND_FILE.PUT_LINE(FND_FILE.LOG, line). This is the standard destination for technical diagnostic messages that administrators review rather than business users.
  • DEBUG — Emits a debug message, but only when the internal debug flag is active. The body conditionally checks JG_UTILITY_PKG.debug_flag before writing to the log file. This allows developers to leave trace statements in production code without generating noise unless debugging is explicitly enabled.
  • ENABLE_DEBUG — Sets the package-level debug flag so that subsequent calls to DEBUG produce log output.
  • DISABLE_DEBUG — Clears the debug flag, suppressing further DEBUG output within the same session.

Tables Accessed

The ETRM documentation records no base tables or APPS synonyms referenced by this package. Its operations are confined to the PL/SQL FND_FILE built-in package, which writes to the Concurrent Manager's temporary output and log files at the operating-system level rather than to database tables. The only persistent state is the in-memory debug_flag package variable. Because no SQL is executed, the package carries negligible database resource cost and cannot contribute to locking or DML contention.

Usage Notes

JG_UTILITY_PKG is referenced by three other packages according to ETRM metadata, confirming its role as a shared infrastructure component within Globalization modules. It is typically invoked from concurrent program PL/SQL entry points, report generation logic, and other JG packages that need uniform message handling. Customizations and extensions in the JG space commonly reuse it to keep logging consistent with Oracle-delivered code.

Because the debug flag is package state, it is scoped to a single database session, so ENABLE_DEBUG must be called within the same session that subsequently calls DEBUG. On Oracle EBS 12.1.1 and 12.2.2 the package operates unchanged, as it depends only on the FND_FILE API, which is available in both releases. It should not be treated as a formal integration API; callers should rely only on the five documented procedures.