Search Results write_msg_list_to_file
Overview
APPS.PO_DEBUG is a diagnostic and tracing utility package body within the Oracle E-Business Suite Purchasing (PO) module. Its primary business function is to provide a centralized, consistent mechanism for emitting debug output, exceptions, and unexpected-error diagnostics from Oracle Purchasing PL/SQL code. Rather than scattering ad-hoc DBMS_OUTPUT.PUT_LINE calls or bespoke logging code across dozens of packages, developers route their diagnostics through PO_DEBUG, which governs whether output is produced, where it is directed, and how it is formatted. The package is classified as API classification OTHER, meaning it is not a public business API in the sense of PO_HEADERS_PUB or PO_LINES_PUB; it is an internal technical utility consumed by the Purchasing code base itself.
The object is documented as VALID in the APPS schema on both Oracle EBS 12.1.1 and 12.2.2, and its metadata is essentially identical across the two releases, indicating a stable interface. It is referenced by 111 other packages, making it one of the more widely depended-upon low-level utilities in the Purchasing module. No database object references PO_DEBUG itself, confirming its position as a leaf-level instrumentation library rather than a component of the business transaction stack.
Key Procedures and Functions
The ETRM metadata documents 25 procedures and functions. The principal entry points fall into several functional groups.
- IS_DEBUG_STMT_ON — Boolean predicate indicating whether statement-level debug output is currently enabled.
- IS_DEBUG_UNEXP_ON — Boolean predicate indicating whether unexpected-error debug output is enabled.
- DEBUG_STMT — Emits a debug message at statement granularity, typically used to trace the execution path through a program unit.
- DEBUG_BEGIN / DEBUG_END — Bracket the entry and exit of a procedure or block, allowing elapsed-path tracing of nested calls.
- DEBUG_VAR — Writes the current value of a scalar variable to the debug stream for inspection.
- DEBUG_EXC — Reports an exception occurrence, capturing the error context for diagnostic review.
- DEBUG_ERR — Reports a handled or anticipated error condition.
- DEBUG_UNEXP — Reports an unexpected error, aligned with the IS_DEBUG_UNEXP_ON switch.
- DEBUG_TABLE — Dumps tabular or collection-based data to the debug output.
- DEBUG_SESSION_GT — Manages or emits debug information related to a session-level global temporary context.
- HANDLE_UNEXP_ERROR — Centralized handler that formats and routes unexpected PL/SQL errors.
- WRITE_MSG_LIST_TO_FILE — Flushes a message list to the output file, supporting concurrent-program log capture.
- PUT_LINE — Low-level line writer used by the other debug routines.
- SET_FILE_IO — Toggles or configures file-based output, directing debug text to a file handle instead of or in addition to the standard output buffer.
All other documented members are supporting routines consistent with these roles.
Tables Accessed
PO_DEBUG does not read or write any Purchasing business tables. Its documented table access is limited to DBMS_OUTPUT, accessed through the public synonym, which is used to emit debug text to the session output buffer. This is consistent with the FND_FILE dependency, which provides the concurrent-program file I/O alternative. The package also depends on PO_LOG, PO_TBL_DATE, PO_TBL_NUMBER, and the PO_TBL_VARCHAR1/5/30/100/2000 collection types, which carry parameter values into the debug routines. The absence of transactional table dependencies confirms that PO_DEBUG performs no business data manipulation and is safe to invoke in any session.
Usage Notes
PO_DEBUG is invoked almost exclusively from other PL/SQL packages in the Purchasing module rather than from Oracle Forms or directly by end users. Its 111 inbound dependencies reflect pervasive use as an instrumentation layer in purchasing APIs and concurrent programs. Developers enable or disable output using the IS_DEBUG_STMT_ON and IS_DEBUG_UNEXP_ON switches, then wrap logic with DEBUG_BEGIN/DEBUG_END and emit values via DEBUG_VAR, DEBUG_STMT, and DEBUG_TABLE. Errors are funneled through DEBUG_EXC, DEBUG_ERR, DEBUG_UNEXP, and HANDLE_UNEXP_ERROR. When the caller runs as a concurrent program, SET_FILE_IO and WRITE_MSG_LIST_TO_FILE allow diagnostics to be written to the log or output file instead of the session buffer. Because the package is an internal utility, customizations should call it only for diagnostics and must not rely on it for business logic; its output is suppressed by default and carries no transactional semantics.
-
PACKAGE BODY: APPS.PO_DEBUG
12.1.1
-
PACKAGE BODY: APPS.PO_DEBUG
12.2.2
-
PACKAGE: APPS.PO_DEBUG
12.1.1
-
PACKAGE: APPS.PO_DEBUG
12.2.2
-
APPS.PO_DEBUG dependencies on FND_LOG
12.2.2
-
APPS.PO_DEBUG dependencies on FND_LOG
12.1.1