Search Results ap_debug




Overview

AP_DEBUG_PKG is a diagnostic utility package in the Oracle Payables (AP) application, owned by the APPS schema. Within Oracle E-Business Suite 12.1.1 and 12.2.2, it serves as the centralized logging and tracing framework used by Payables PL/SQL programs — most notably concurrent programs, interfaces, and validation routines — to record debug information during execution. It is classified as an OTHER API in the ETRM repository and holds a VALID status, confirming it compiles cleanly against its declared dependencies: APP_EXCEPTION, FND_FILE, FND_MESSAGE, and the SYS.STANDARD package.

The package provides a controlled mechanism for emitting trace messages to the concurrent manager log and output files, allowing developers and support analysts to diagnose processing failures without modifying production code. It is not referenced by any database object, meaning it is a terminal (leaf) utility: it consumes other services but is not itself consumed by dependent database objects. Despite this, the ETRM metadata records that the package is referenced by eleven other PL/SQL packages, indicating widespread use across the Payables codebase.

Key Procedures and Functions

The documented API surface consists of eight procedures and functions, of which three are named in the metadata: SPLIT, INDENT_TEXT, and PRINT.

  • PRINT — The primary logging routine. It writes a caller-supplied message to the designated debug output destination, typically the FND_FILE log or output stream, subject to the active debug level. It is the entry point most frequently invoked by other Payables packages.
  • INDENT_TEXT — Produces or adjusts leading whitespace on a message so that nested or hierarchical debug output is visually aligned. This supports readable traces when multiple routines log within the same execution context.
  • SPLIT — Breaks long text strings into manageable segments, ensuring messages conform to line-length constraints of the FND_FILE output buffer and remain readable in the concurrent request log.

The remaining five documented routines are not individually named in the ETRM excerpt; they provide ancillary formatting, level-checking, and message-assembly services that support the three named procedures above.

Tables Accessed

The ETRM metadata lists no base tables or APPS synonyms accessed by AP_DEBUG_PKG; the referenced tables set is empty. This is consistent with its role as a pure logging utility: it does not read or write application data. Output is directed exclusively through the FND_FILE package to the concurrent manager log and output files, while user-facing or developer-facing text is resolved through FND_MESSAGE and error conditions are raised or handled via APP_EXCEPTION. Persistent debug state, where used, is held in package variables rather than database tables.

Usage Notes

AP_DEBUG_PKG is invoked from within other Payables PL/SQL packages at strategic points in processing logic — entry to a procedure, before and after significant DML, and inside exception handlers — to capture a runtime narrative of execution. It is most often active during concurrent program runs, where FND_FILE writes are visible in the request log and output. Because it is not referenced by any database object, it is never called through a form trigger, database trigger, or view; all invocations originate in PL/SQL code, including customer extensions that mirror Oracle's internal logging pattern. Debug verbosity is normally gated by a site- or program-level flag, so production runs incur minimal overhead. When diagnosing a failed Payables interface or payment process, enabling this package's output is a standard first step before escalating to Oracle Support.