Search Results oks_debug




Overview

OKS_RENEW_PVT is a private (PVT) PL/SQL package body owned by the APPS schema in Oracle E-Business Suite, associated with the Service Contracts (OKS/OKC) module. Its documented responsibility is internal renewal processing support and, more specifically as reflected in the source excerpt, a shared debug and performance-logging utility. The package provides a controlled mechanism for writing performance and error messages to a log file whose name and location are derived from the utl_file_dir initialization parameter and the current session and user identifiers. Because it is classified as a private package, it is not exposed as a public API; it is intended for use by other packages within the same functional area.

Key Procedures and Functions

  • DEBUG_LOG — A wrapper procedure that accepts a program name, a performance message, an error message, and a path, then delegates to the underlying Debug_Log routine, returning message data, a message count, and a return status. It serves as the externally visible entry point for the logging behaviour of this package.
  • Debug_Log — The core logging procedure. It constructs a timestamped log entry, resolves the log directory from utl_file_dir, and writes performance and/or error messages to a file named in the pattern ERM_l_session_id_FND_GLOBAL.user_id. Notably, the source comments state that under Release 12 this procedure should no longer be used for logging, but it is retained for backward compatibility and writes to the standard FND_LOG_MESSAGES table via the FND_LOG API when the current runtime level permits.

Tables Accessed

The package references UTL_FILE and V$PARAMETER through APPS synonyms. V$PARAMETER is queried to retrieve the first value of the utl_file_dir parameter, which determines where the debug log file is written. UTL_FILE is the Oracle-supplied file I/O package used to open and write the log file. In R12 environments the procedure additionally routes messages to the standard FND logging infrastructure rather than relying solely on flat-file output.

Usage Notes

OKS_RENEW_PVT is invoked internally by other Service Contracts packages; ETRM metadata records that it is referenced by four other packages. It is not typically called directly from Oracle Forms or concurrent program definitions. The oks_debug search term relevant to this object reflects the OKS_D profile option, which commonly governs whether debug logging is active. When troubleshooting renewal or contract-processing issues, administrators enable the OKS debug profile, and this package emits diagnostic output accordingly. Because the flat-file logging path is deprecated in R12, integrators should prefer standard FND_LOG diagnostics, treating OKS_RENEW_PVT's file-writing behaviour as a legacy compatibility feature.