Search Results inv_debug_level




Overview

APPS.INV_DEBUG_INTERFACE is a utility package body in Oracle E-Business Suite that provides a standardized mechanism for enabling and disabling the Inventory Debugger from external products and calling modules. The Inventory Debugger is a diagnostic facility used by Oracle Inventory and related modules (such as shipping, receiving, and order management) to capture detailed runtime trace information during the execution of inventory transactions and APIs. Rather than requiring each product to manage debugger state independently, INV_DEBUG_INTERFACE centralizes the activation logic and manipulates the underlying FND profile options that the debugger framework consumes.

The package is classified in ETRM as an "OTHER" API, meaning it is not a formal business object API but an infrastructure utility. Its header identifies it as a shipped, non-customized database object maintained under the INV product family. The package exposes a minimal, stable surface area consisting of two documented procedures, and it is referenced by four other packages within the E-Business Suite, confirming its role as a shared diagnostic integration point.

Key Procedures and Functions

  • start_inv_debugger — Turns the Inventory Debugger on. It sets the INV_DEBUG_LEVEL profile to 10, sets INV_DEBUG_TRACE to 1, and assigns an output file target via the INV_DEBUG_FILE profile. When the package is invoked from within a concurrent program context (that is, a valid concurrent request ID exists), it applies default debugger settings and returns immediately, directing output to a placeholder destination rather than a caller-supplied file. When no concurrent request context exists, the procedure requires the caller to supply a directory name, a file name, and an already-open UTL_FILE handle; it constructs a fully qualified file path, applies the debugger profile settings, and stores the file handle in a package global for subsequent trace writes.
  • stop_inv_debugger — Turns the Inventory Debugger off. It resets the debug level profile to a null value, sets INV_DEBUG_TRACE to 2 to signal termination of tracing, and clears the INV_DEBUG_FILE profile, restoring the profile environment to its default state.

Both procedures encapsulate their logic in an exception handler that suppresses errors, ensuring that diagnostic activation or deactivation never interrupts the calling transaction.

Tables Accessed

The package does not read or write application tables directly. Its only documented table reference is through the UTL_FILE package, used to validate and manage the open file handle supplied by the caller. All persistent debugger state is held in FND profile options — INV_DEBUG_LEVEL, INV_DEBUG_TRACE, and INV_DEBUG_FILE — which the debugger framework reads at runtime to determine whether to emit trace output and where to write it.

Usage Notes

INV_DEBUG_INTERFACE is typically invoked from custom or standard PL/SQL code that needs to capture Inventory debugger output for troubleshooting, such as during the execution of inventory transaction APIs. A caller first opens a file with UTL_FILE (or relies on the concurrent program context), then calls start_inv_debugger, executes the code under investigation, and finally calls stop_inv_debugger to reset the profile options. Because the package keys off FND_GLOBAL.CONC_REQUEST_ID, it behaves differently in concurrent processing versus online form or ad hoc sessions. The INV_DEBUG_TRACE profile referenced in the source corresponds to the user-visible trace control often searched as "inv_debug_trace," making this package the programmatic entry point for that setting.