Search Results p_msg_buf




Overview

MRP_MRPRPPIT_XMLP_PKG is an Oracle E-Business Suite PL/SQL package body owned by the APPS schema and classified as OTHER within the ETRM repository. The package exists to service the MRPRPPIT report family, a planned-item and inventory turnover reporting utility registered under the Oracle Material Requirements Planning (MRP) module. Its naming follows the standard XML Publisher report integration convention (_XMLP_PKG), indicating that the package accompanies an XML Publisher (BI Publisher) concurrent program for Oracle EBS 12.1.1 and 12.2.2. The package supplies report-specific bind variables, formatting formulas, and before/after report phase logic that the report engine invokes at defined points in the concurrent request lifecycle. It is self-contained and is not referenced by any other package in the database, meaning it acts purely as a report-level helper rather than a shared API.

Key Procedures and Functions

  • C_PLANNED_ORG_CODEFORMULA — A formula function that returns the three-character organization code for the planned organization identifier supplied by the report parameter. It resolves the code from inventory organization parameters used during report rendering.
  • C_COST_TYPEFORMULA — A formula function that returns the description of the cost type identified by the report's cost type parameter, allowing the report layout to display a readable cost type name rather than its internal identifier.
  • BEFOREREPORT — The before-report trigger and the core initialization routine of the package. It initializes the concurrent request identifier via FND_GLOBAL.CONC_REQUEST_ID, optionally enables SQL tracing when the debug parameter is set, declares exception conditions for incomplete plan, explosion, and snapshot data, and opens a cursor over the plan organizations and plan schedules views to resolve compile designator and planned organization context. It also evaluates lookup-driven conversions for date and precision settings.
  • C_P_MULTI_ORGFORMULA — A formula function that supports the report's multi-organization display option, returning a formatted value driven by the organization-type parameter selection.
  • AFTERREPORT — The after-report trigger invoked once row processing completes, used for cleanup and any final output or session reset logic.
  • C_BEGIN_INV_D2FORMULA — A formula function that returns a formatted beginning-of-period inventory or date value for the second inventory column displayed on the report.
  • MRP_WEEKS_MONTHS — A routine that computes week and month bucket boundaries used for the period-based reporting horizon of the planned item output.
  • MRP_CALCULATE_INVENTORY_TURNS — The principal computational routine; it derives inventory turnover metrics from plan and inventory inputs for display in the report output.

Tables Accessed

  • MTL_PARAMETERS — Read to resolve ORGANIZATION_CODE for a given ORGANIZATION_ID, satisfying the planned organization code formula and providing multi-organization context.
  • CST_COST_TYPES — Read to resolve the cost type description from the report's cost type parameter.
  • MRP_PLANS — Read to validate and describe the selected plan, including compile designator and plan naming data.
  • MRP_FORM_QUERY_S — Read as the saved query definition source for the report's parameter form context.
  • DUAL — Used for single-row expression evaluation, including the lookup-driven decode logic executed in the before-report phase.

The package also queries the views MRP_PLAN_ORGANIZATIONS_V and MRP_PLAN_SCHEDULES_V, which are the reporting-layer sources for organization and schedule context.

Usage Notes

The package is invoked exclusively by the MRPRPPIT XML Publisher concurrent program. Users submit the report through the standard concurrent request interface, selecting a plan, planned organization, organization type, cost type, and debug flag. The report engine calls BEFOREREPORT before fetching data, the formula functions during layout processing, and AFTERREPORT upon completion. Because the package is not referenced by any other database object, it should not be called directly from custom code; the supported extension points remain the report parameters and the underlying plan data. In 12.1.1 and 12.2.2 environments the header revision (120.0, dated 2007) remains unchanged, and the package continues to rely on FND_GLOBAL for request context and on the SRW initialization convention commented out in the source for compatibility.