Search Results get_package_base




Overview

APPS.PO_LOG is a PL/SQL package body in Oracle E-Business Suite that provides the centralized logging and diagnostic infrastructure for the Oracle Purchasing (PO) module. It is an internal utility package rather than a business-facing API. Its primary role is to allow Purchasing code — validation routines, forms, concurrent programs, and dependent APIs — to emit structured, leveled log messages that can be selectively enabled at runtime without modifying or recompiling calling code.

The package is classified as OTHER (not a public API) in the ETRM metadata and holds a VALID status in both 12.1.1 and 12.2.2. Its design is significant for support and debugging: it is referenced by 170 other packages across the application, making it one of the most widely consumed internal utilities in Purchasing. Logging is controlled through profile options and an internal flag cache refreshed via FND_PROFILE, and output is routed through the FND_LOG and FND_LOG_REPOSITORY framework. This means PO_LOG integrates directly with the standard Oracle EBS Logging (FND Logging) and diagnostics infrastructure rather than maintaining its own log store.

Key Procedures and Functions

The package exposes 62 documented procedures and functions. The principal groups are:

  • ENABLE_LOGGING — Enables logging for the session or a given scope, typically based on profile settings.
  • REFRESH_LOG_FLAGS — Reloads cached logging flags from profile options so that newly enabled or disabled values take effect without reconnecting.
  • GET_PACKAGE_BASE / GET_SUBPROGRAM_BASE — Return the base names used to identify the calling package and subprogram, supporting consistent log message formatting.
  • STMT, STMT_SESSION_GT, STMT_ALL_SESSION_GT, STMT_TABLE — Statement-level logging entry points for logging SQL statements, session-specific global temporary table content, and table-level information.
  • PROC_BEGIN, PROC_END, PROC_RETURN, PROC_RAISE — Procedure lifecycle logging: entry, normal exit, return values, and exception propagation.
  • EVENT — Logs discrete business or application events of interest.
  • EXC — Logs caught exceptions together with context.
  • LOG — The general-purpose logging routine used for arbitrary messages and levels.

Tables Accessed

The package primarily uses the global temporary table PO_SESSION_GT to hold session-scoped logging context, and does not persist to permanent application tables. It queries the data dictionary views ALL_TAB_COLUMNS and ALL_SYNONYMS to introspect table and synonym metadata, for example to validate or describe objects referenced in log statements. PLITBLM is used as a PL/SQL index-by table of VARCHAR2, a SYS-provided type used for internal table handling. Log output is delivered through the FND_LOG and FND_LOG_REPOSITORY framework rather than through direct inserts by PO_LOG itself.

Usage Notes

PO_LOG is invoked internally by Purchasing APIs, forms, and concurrent programs; it is referenced by 170 dependent objects but is not itself referenced by any database object, confirming its position as a leaf utility. Custom code should call the standard FND_LOG API for new development rather than PO_LOG directly, since PO_LOG is not a supported public interface and its signature may change without notice. Logging is activated by setting the relevant FND profile options and calling REFRESH_LOG_FLAGS. Where deeper diagnostics are required for a Purchasing validation or exception, PO_LOG is the routine the module itself uses, so enabling it exposes the same trace information Oracle Support relies on.