Search Results p_optimizer_code




Overview

The APPS.INV_INVSRPLN_XMLP_PKG package is a generated Oracle E-Business Suite concurrent program package that supports the Inventory Replenishment Planning (Replenishment) XML Publisher report. The suffix XMLP_PKG identifies it as an XML Publisher (BI Publisher) integration wrapper: Oracle's concurrent manager invokes this package when the replenishment report is submitted, and the package performs the pre-report and post-formula processing that the report layout expects before and after the data model is executed. In Oracle EBS 12.1.1 and 12.2.2 this package resides in the APPS schema and is declared with AUTHID CURRENT_USER, meaning it executes with the privileges of the calling database user rather than the owner, which is the standard Oracle Reports/XML Publisher execution model on the applications database tier. Practically, the package exists to bind the report's runtime parameters, capture the concurrent request context, and stage report output so that the XML layout can render replenishment planning data sourced from the Inventory module.

Key Procedures and Functions

The ETRM metadata documents two procedures within this package, both of which are standard entries in the Oracle Reports and XML Publisher generated package pattern:

  • BEFOREREPORT — Executed before the report's data model is processed. In generated XML Publisher packages this function typically initializes the reporting environment, resolves the concurrent program request identifier, and prepares any session-level values the layout requires prior to the SQL queries firing. It returns a Boolean indicating success or failure.
  • AFTERPFORM — Executed after the report's form and parameter processing phase. This is generally where the package sets derived parameter values, binds the resolved organization context, and finalizes parameters consumed by the data model or the XML template. It also returns a Boolean.

Both functions are declared in the package specification without formal parameter lists, consistent with the Oracle Reports-generated XML Publisher package convention, where values are exchanged through package-level global variables rather than arguments.

Tables Accessed

The ETRM metadata records no direct table references through APPS synonyms for this package. This is expected behavior for an XML Publisher wrapper package: the substantive replenishment query logic is embedded in the report definition and data template, not in the PL/SQL package itself. The package therefore contains no documented DML or SELECT against base tables; any data retrieval is performed by the underlying report SQL, which accesses Inventory replenishment and planning views according to the report definition rather than through this package's PL/SQL body.

Usage Notes

This package is not intended for direct invocation by forms, custom code, or end users. It is called exclusively by the Oracle concurrent manager during execution of the Inventory Replenishment Planning report and functions purely as a technical bridge between the concurrent program and the XML Publisher rendering engine. The package declares several package-level variables reflecting the standard generated pattern, including P_CONC_REQUEST_ID, P_TRACE_FLAG, P_OPTIMIZER_CODE, and P_ORGANIZATION_ID. The presence of P_OPTIMIZER_CODE — the value referenced in the user's search — reflects the report parameter used to influence the SQL optimizer behavior during report execution, allowing DBAs and functional users to tune query performance for large inventory organizations. The package is not referenced by any other package in the documented metadata (zero inbound references), confirming that it sits at the top of its call stack and is invoked only by the concurrent processing framework. Customizations should therefore be applied at the report or data template level rather than by modifying this package, since regenerating the report definition would overwrite changes made directly to the PL/SQL package body.