Search Results okc_debug




Overview

OKC_DEBUG is a diagnostic utility package delivered in the APPS schema as part of the Oracle Contracts (OKC) application family within Oracle E-Business Suite 12.1.1 and 12.2.2. It is classified in the ETRM repository as an OTHER API, meaning it is a supporting infrastructure package rather than a public business API intended for external integration. Its purpose is to provide contract development and support personnel with a controlled mechanism for emitting hierarchical diagnostic output during the execution of Contracts-related PL/SQL code. The package manages indentation state, trace activation, and log routing so that nested procedure calls can be rendered as an intelligible trace tree rather than an undifferentiated stream of messages. Because OKC_DEBUG is not referenced by any database object in the dependency listing, it functions purely as a callable service and never as a dependency of production code paths.

Key Procedures and Functions

  • SET_INDENTATION — Increases the current indentation level used when formatting debug output, allowing nested call contexts to appear progressively deeper in the trace.
  • RESET_INDENTATION — Returns the indentation state to its base level, typically invoked when unwinding out of a nested block or on completion of a traced routine.
  • SET_CONNECTION_CONTEXT — Establishes the session context in which tracing operates, ensuring subsequent logging calls are attributed to the correct runtime environment.
  • LOG — The principal output routine; writes a diagnostic message through the enabled logging and profile-driven channels, honoring the active indentation level.
  • SET_TRACE_ON — Enables trace output for the session, activating the diagnostic path consulted by LOG.
  • SET_TRACE_OFF — Disables trace output, restoring normal silent execution.

Tables Accessed

The only table documented as referenced through an APPS synonym is PLITBLM. This is not an application data table; it is an Oracle-supplied PL/SQL internal table used for parsing and line-buffer handling, consistent with the package's role in assembling and emitting formatted diagnostic text. No Contracts business tables are read or written by OKC_DEBUG, confirming that it performs no transactional work and carries no data-integrity risk. All other dependencies are programmatic: FND_API, FND_LOG, and FND_PROFILE from the Oracle Application Object Library, plus OKC_API. FND_LOG supplies the underlying logging infrastructure, FND_PROFILE provides the profile option values that gate tracing, and FND_API provides standard API conventions and message handling. OKC_API is referenced for Contracts-specific helper calls, and STANDARD and PLITBLM are standard PL/SQL dependencies.

Usage Notes

OKC_DEBUG is never invoked by a concurrent program or a form directly, and it exposes no user interface. It is called from within other Contracts PL/SQL packages and from custom code when a developer or support analyst needs to trace execution flow. The typical pattern is to call SET_TRACE_ON, wrap the code of interest with SET_INDENTATION and RESET_INDENTATION around nested calls, emit messages via LOG, and finish with SET_TRACE_OFF. SET_CONNECTION_CONTEXT is invoked once to bind the tracing to the current session. Because the ETRM metadata records that OKC_DEBUG is referenced by 91 other packages, it is embedded widely across the Contracts codebase as a shared diagnostic layer. Trace activation should be treated as session-local and temporary, since verbose output carries performance and log-volume implications. The package is not designed for production instrumentation of high-frequency transactions and should be enabled only during targeted investigation.