Search Results create_pdr




Overview

GMP_PLNG_DTL_REPORT_PKG is an Oracle EBS Process Manufacturing (OPM) package owned by the APPS schema that produces the Planning Detail Report (PDR). Functionally it belongs to the OPM planning and scheduling domain, where planners require a consolidated, multidimensional view of supply and demand activity across a plan and its organizations over a defined time horizon. The report presents planning information along horizontal, vertical, and exception axes, and also emits an XML rendition of the same data for consumption by Oracle XML Publisher.

The package header declares AUTHID CURRENT_USER, so all SQL executes with the privileges of the invoking user rather than the package owner. This makes the package usable from concurrent programs, forms, and custom code that already hold the necessary OPM and MSC data privileges. Fifteen documented procedures and functions make up the public surface, with create_pdr serving as the primary entry point that users and integrators most commonly search for.

Key Procedures and Functions

  • CREATE_PDR — The main driver procedure. It accepts the instance, organization, plan, plan organization, start date, and reporting window, together with day, week, and period bucket parameters and their associated cutoff dates. It also receives planner, buyer, item, category, and ABC class ranges, exception type, activity inclusion flags, and a suite of formatting controls for the combined, horizontal, vertical, exception, and action PDR sections, each with placement, template, and locale settings. It returns the standard concurrent program errbuf and retcode out parameters.
  • INSERT_ITEMS — Populates the working data set of items to be reported, applying the item, category, and ABC class selection criteria.
  • VALIDATE_PARAMETERS — Validates submitted report parameters before processing begins, ensuring ranges and bucket definitions are internally consistent.
  • HORIZ_PLAN_STMT — Builds and executes the horizontal planning statement that drives the horizontal section of the report.
  • VERT_PLAN_STMT — Builds and executes the vertical planning statement for the vertical report section.
  • ITEM_EXCEPTION_STMT — Generates the statement that extracts item-level planning exceptions.
  • ITEM_ACTION_STMT — Generates the statement covering item action/activity information.
  • GENERATE_XML — Produces the XML payload for the report from the assembled query results.
  • PLAN_NAME — Returns the descriptive name of a given plan.
  • PLAN_ORG — Returns the organization associated with a plan.
  • CATEGORY_SET_NAME — Resolves the category set name from its identifier.
  • LOOKUP_MEANING — Returns the meaning of a lookup code, typically for exception or action descriptions.
  • PS_GENERATE_OUTPUT — Generates the final formatted report output.
  • XML_TRANSFER — Moves the generated XML into the location expected by the reporting template.
  • GMP_DEBUG_MESSAGE — Writes diagnostic messages to support debugging during report execution.

Tables Accessed

The package reads planning and calendar data through APPS synonyms. MSC_PLANS, MSC_PLAN_ORGANIZATIONS, and MSC_TRADING_PARTNERS supply plan definitions, plan organizations, and trading partner information. MSC_CAL_WEEK_START_DATES and MSC_PERIOD_START_DATES provide the calendar anchors for week and period bucketing, while MSC_CATEGORY_SETS supports category set resolution. FND_LOOKUP_VALUES backs the LOOKUP_MEANING function. Report staging uses GMP_HORIZONTAL_PDR_GTMP and GMP_PDR_XML_TEMP. XML Publisher integration relies on XDO_TEMPLATES_B. The package also calls DBMS_LOB, DBMS_SQL, DBMS_XMLGEN, and DBMS_XMLQUERY for dynamic SQL and XML generation.

Usage Notes

GMP_PLNG_DTL_REPORT_PKG is not referenced by any other package, so it functions as a top-level reporting entry point. It is normally invoked from the concurrent program that defines the Planning Detail Report, with CREATE_PDR acting as the concurrent executable's main procedure. The XML output path, together with XDO_TEMPLATES_B and XML_TRANSFER, indicates the report is rendered through Oracle XML Publisher rather than the classic report writer. The extensive parameter list — including the instance identifier and the combined, horizontal, vertical, exception, and action output controls — reflects that callers submit a single parameter set to produce several report sections in one run. These same parameters make the package straightforward to invoke from custom PL/SQL, but callers should respect the AUTHID CURRENT_USER setting by ensuring the executing schema holds the required OPM and MSC data grants.