Search Results rcv_debug_mode




Overview

ASN_DEBUG is a server-side PL/SQL utility package owned by APPS in Oracle E-Business Suite releases 12.1.1 and 12.2.2. Its sole business function is diagnostic: it centralizes the writing of debug and trace messages emitted by the Advanced Shipment Notice (ASN) and Receiving family of programs, most notably the RCV (Receiving) transactions interface processing. The package provides a controlled, level-based logging framework so that developers and support analysts can capture the internal execution path of receiving interface code without modifying the underlying application logic.

The package derives its behavior from two profile options. The variable g_debugging_enabled is initialized from the profile RCV_DEBUG_MODE, and the variable g_inv_debug_enabled is initialized from INV_DEBUG_TRACE. The RCV_DEBUG_MODE profile is therefore the primary switch that determines whether debug output is produced at all, which explains why users searching on that term frequently arrive at this package. Logging output is routed to a file rather than to a database table, and message severity is expressed through FND_LOG levels, with level_error used as the default.

Key Procedures and Functions

The ETRM metadata documents ten named program units within ASN_DEBUG. Their purposes are as follows.

  • GET_DEBUGGING_ENABLED — Returns a Boolean indicating whether debug output is currently active, based on the evaluated profile setting.
  • SET_MODULE_NAME — Establishes the module identifier that is stamped onto subsequent log records so that output can be attributed to the correct calling program.
  • START_PROCEDURE — Marks entry into a named procedure, pushing that procedure onto an internal execution stack.
  • STOP_PROCEDURE — Marks exit from a named procedure, optionally popping the procedure from the internal stack.
  • PRINT_STACK — Emits the current contents of the internal procedure stack, providing a call-path trace.
  • DEBUG_MSG — Writes a single debug line, accepting a message, an optional FND_LOG level, and an optional label.
  • DEBUG_MSG_EX — An extended variant of DEBUG_MSG that additionally records the module, procedure name, and line number associated with the message.
  • GET_CALLING_MODULE — Resolves and returns the identity of the module that invoked the logging routine.
  • IS_DEBUG_ON — A convenience predicate indicating whether debugging is presently enabled.
  • PUT_LINE — The core write routine that places a formatted message into the log file; it accepts the line text, a log level, and an inventory debug level.

Several package-level globals support this framework, including g_current_module, g_level, g_procedure_stack, and g_current_procedure.

Tables Accessed

The documented metadata references two objects. RCV_TRANSACTIONS_INTERFACE, accessed through an APPS synonym, is the receiving interface staging table that the surrounding ASN and receiving programs process; ASN_DEBUG participates in instrumenting that processing. DBMS_UTILITY, the Oracle-supplied utility package, is used to resolve the runtime call stack that backs the procedure-stack logging and the GET_CALLING_MODULE logic.

Usage Notes

ASN_DEBUG is not an end-user API. It is invoked internally by receiving and ASN code paths and is referenced by 56 other packages, making it a shared diagnostic dependency. Typical invocation occurs from concurrent programs and interface-processing PL/SQL that handle ASN and RCV_TRANSACTIONS_INTERFACE data, where START_PROCEDURE, DEBUG_MSG_EX, and STOP_PROCEDURE calls bracket significant logic, and PRINT_STACK is used on error. Custom code following the same pattern should call IS_DEBUG_ON or GET_DEBUGGING_ENABLED before emitting output. Enablement is controlled administratively by setting the RCV_DEBUG_MODE profile option; when this is null or disabled, logging calls return without producing file output, so the profile must be set for a meaningful trace to be generated.