Search Results stmt_session_gt




Overview

PO_LOG is the centralized logging infrastructure package for the Oracle Purchasing (PO) module in Oracle E-Business Suite 12.1.1 and 12.2.2. It is owned by the APPS schema and is classified as an OTHER API, meaning it is an internal utility package rather than a public business API to be called directly by external integrations. Its principal business function is to provide a uniform, consistent diagnostic logging framework across the entire Purchasing code base, so that developers and support engineers can trace execution flow, capture statement-level detail, record events and exceptions, and diagnose problems in a predictable format regardless of which PO subprogram is executing.

The package is defined with AUTHID CURRENT_USER, so it executes with the privileges of the calling user rather than the definer. It exposes a large public surface — 62 documented procedures and functions — and is referenced by 170 other packages, making it one of the most widely depended-upon utilities within Purchasing. The name PO_LOG reflects its role as the single logging entry point; the referenced standards document on the PO logging strategy indicates that all PO code is expected to route diagnostic output through this package rather than calling FND_LOG directly.

Key Procedures and Functions

The package groups a set of control routines and a set of logging routines:

  • ENABLE_LOGGING — Enables or configures logging behavior for the session.
  • REFRESH_LOG_FLAGS — Refreshes the cached logging flags. The header metadata notes these variables must be refreshed whenever the Apps context changes, typically during package initialization and as a hook in FND_GLOBAL.APPS_INITIALIZE, enabled through the FND_PRODUCT_INITIALIZATION table.
  • GET_PACKAGE_BASE — Returns the base log level or prefix associated with the calling package, supporting per-package log configuration.
  • GET_SUBPROGRAM_BASE — Returns the base value for the current subprogram, refining the granularity of log control below the package level.
  • STMT, STMT_SESSION_GT, STMT_ALL_SESSION_GT, STMT_TABLE — Statement-level logging routines. STMT writes a statement message; the session global temporary table variants and STMT_TABLE log row content, with the c_all_rows constant indicating that every row in a table should be logged.
  • PROC_BEGIN, PROC_END, PROC_RETURN, PROC_RAISE — Mark procedure entry, exit, return and raise points. The constants c_PROC_BEGIN (-1), c_PROC_END (-2), c_PROC_RETURN (-3) and c_PROC_RAISE (-4) identify these markers, which is directly relevant to the search term "proc_end".
  • EVENT, EXC, LOG — Generic event, exception and general-purpose logging entry points, controlled by the c_EVENT and c_EXC constants mapped to FND_LOG levels.

Tables Accessed

The package references several objects through APPS synonyms. PO_SESSION_GT is the session-scoped global temporary table used to capture row-level log data for the session GT routines, particularly valuable for submission check and encumbrance processing. ALL_SYNONYMS and ALL_TAB_COLUMNS are queried to resolve object and column metadata when logging table content and constructing statements. PLITBLM supports PL/SQL table handling.

Usage Notes

PO_LOG is invoked from virtually every layer of the Purchasing stack — concurrent programs, forms, business logic packages and custom extensions — wherever diagnostic output is required. The typical pattern is to call PROC_BEGIN and PROC_END around a subprogram to bracket execution, rather than relying on an explicit "proc_end" reference. Custom code extending PO should honor the same conventions, calling REFRESH_LOG_FLAGS when the Apps context changes and gating output through the returned flag values.