Search Results print_development_csv




Overview

QP_DEBUG_UTIL is a diagnostic and instrumentation utility package owned by the APPS schema in Oracle E-Business Suite, classified under the UTIL API category. It exists to provide developers and support engineers with a consistent mechanism for tracing, timing, and extracting runtime data from Oracle Advanced Pricing and related Order Management code paths. The package is not a business API; it does not price orders, calculate adjustments, or modify transactional data. Instead, it supplies reusable debugging primitives that other packages call to record execution markers, accumulate elapsed time, and dump internal data structures to flat files or the debug log.

The package header declares AUTHID CURRENT_USER, meaning its procedures execute with the privileges of the invoking schema rather than the definer. This is appropriate for a utility invoked from multiple modules, since it allows callers to write output using their own directory and file privileges. Several global variables are initialized at package load: G_DEBUG (seeded from OE_DEBUG_PUB.G_DEBUG), G_Debug_Level (from the profile option ONT_DEBUG_LEVEL), and G_qp_debug (from the profile option QP_DEBUG). These profile-driven switches determine whether diagnostic output is produced at all, allowing production environments to disable tracing without code changes.

Key Procedures and Functions

The documented API surface comprises nineteen procedures and functions, which fall into three functional groups.

  • Output and time-logging primitives: WRITE_OUTPUT emits a line to the debug output destination. TSTART and TSTOP bracket a block of code, recording a named marker, an optional description, and elapsed time. TDUMP writes the accumulated timing information, while TFLUSH clears the in-memory timing stack. These routines operate against the package-level t_TimeStack, t_CallStack, and summary log collections.
  • Debug-state predicates: ISQPDEBUGON and ISTIMELOGDEBUGON return Boolean indicators reflecting whether pricing debug and time-log debug are currently enabled. Callers use these to avoid constructing expensive debug strings when tracing is off.
  • CSV extraction routines: PRINT_TABLE_DATA_CSV, PRINT_QUERY_DATA_CSV, PRINT_CURSOR_DATA_CSV, PRINT_QUERYLIST_DATA_CSV, PRINT_SUPPORT_CSV, and PRINT_DEVELOPMENT_CSV serialize tables, dynamic queries, open cursors, query lists, support diagnostics, and development data respectively into comma-separated output. The search term print_development_csv corresponds directly to the PRINT_DEVELOPMENT_CSV procedure, which is the entry point used to export developer-oriented diagnostic data sets.
  • Summary and attribute helpers: SETCURRENTEVENT records the active pricing event; ADDSUMMARYTIMELOG and DUMPSUMMARYTIMELOG build and emit the summarized timing log introduced under Bug# 8933551; SETATTRIBUTE and GETATTRIBUTE store and retrieve arbitrary key-value diagnostics in the g_comm_attribs associative array.

Tables Accessed

The package references no application tables directly. All documented dependencies are dictionary or utility objects accessible through APPS synonyms: DUAL, DBMS_SQL, DBMS_UTILITY, PLITBLM, and UTL_FILE. DBMS_SQL supports the dynamic query and cursor extraction routines, UTL_FILE performs the physical file writes for the CSV procedures, DBMS_UTILITY supplies timing and call-stack support, PLITBLM backs the associative-array operations, and DUAL serves scalar evaluations. The absence of transactional table access confirms the package's role as a passive observer.

Usage Notes

QP_DEBUG_UTIL is invoked from PL/SQL rather than from a user-facing form. It is referenced by seven other packages, which call its timing and CSV routines during pricing, order capture, and concurrent processing. Enabling output typically requires setting the QP_DEBUG or ONT_DEBUG_LEVEL profile option at the appropriate level, since the internal flags are initialized from these profiles. Because PRINT_DEVELOPMENT_CSV and its sibling CSV routines rely on UTL_FILE, the invoking session must have a valid UTL_FILE_DIR configuration or directory object, and the target path must be writable by the database server process. In Oracle EBS 12.1.1 and 12.2.2 the package remains a support and diagnostics tool; it should be exercised in non-production environments or under controlled debugging sessions, since trace output and file generation impose measurable overhead on the calling code path.