Search Results create_model




Overview

The QPR_CREATE_AW package is an Oracle EBS Advanced Pricing (Oracle Pricing) utility package responsible for creating and managing Oracle OLAP analytic workspaces (AWs) and models derived from pricing data. It is a server-side PL/SQL package owned by APPS and declared with AUTHID CURRENT_USER. Its primary business function is to transform price plan definitions and their associated pricing structures — cubes, dimensions, measures, models, and expressions — into OLAP analytic workspaces used for analysis and calculation of pricing data.

The package was introduced in the 11i/12.0 code line (the header shows 120.0 from 2007) and remains available in Oracle EBS 12.1.1 and 12.2.2 as part of the pricing/ETRM schema. It bridges relational pricing metadata stored in QPR_* tables with the OLAP engine exposed through DBMS_AW and DBMS_AW_XML. In this context, an "analytic workspace" is the OLAP container holding multidimensional pricing data; models and equations defined on it drive price calculation logic.

Notably, the package is not referenced by any other documented package, indicating it is invoked directly rather than as a nested dependency in a larger call chain.

Key Procedures and Functions

  • CREATE_AW — Creates an analytic workspace for a given price plan. It accepts an OUT error buffer, an OUT return code, and the price plan identifier (P_PRICE_PLAN_ID). This is the core entry point for AW generation.
  • CREATE_AWXML — Creates the analytic workspace via XML definitions, using the same error/return-code and price plan parameters. This variant supports XML-driven AW creation, typically leveraging DBMS_AW_XML.
  • AW_EXISTS — A Boolean function that checks whether an analytic workspace with a specified name (P_AW_NAME2) already exists. It is used to prevent duplicate AW creation.
  • CREATE_MODEL — Builds an OLAP model for a given price plan (p_price_plan_id) and cube (p_cube_code). Models contain the equations that drive pricing calculations.
  • SUBMIT_REQUEST_SET — Submits a request set, returning the request ID (P_REQUEST_ID), statement number (P_STMT_NUM), error buffer, and return code, for the specified price plan (P_PRICE_PLAN_ID). This procedure is the one directly relevant to the "submit_request_set" search and is typically used to kick off concurrent processing associated with AW creation or refresh.

Tables Accessed

  • QPR_PRICE_PLANS_B — Base price plan definitions; the source driving which AW is created.
  • QPR_CUBES / QPR_CUBE_DIMS — Cube definitions and their dimensional mappings, used to construct the AW structure.
  • QPR_DIMENSIONS — Dimension metadata for the multidimensional AW.
  • QPR_MEASURES — Measure definitions stored in the AW.
  • QPR_MODELS / QPR_MODEL_EQUATIONS — OLAP model and equation definitions used by CREATE_MODEL.
  • QPR_EXPRESSIONS — Calculation expressions referenced by models.
  • QPR_TERMS — Pricing term metadata associated with price plans.
  • DBMS_AW / DBMS_AW_XML — Oracle-supplied OLAP packages (not QPR tables) invoked to physically create and manipulate the analytic workspace.

Usage Notes

QPR_CREATE_AW is typically invoked from Oracle Pricing setup or administration flows, most commonly when an administrator builds or refreshes an analytic workspace for a price plan. The presence of SUBMIT_REQUEST_SET indicates that AW creation can be asynchronous: a form or custom concurrent program calls SUBMIT_REQUEST_SET to submit a request set, then polls the returned request ID. CREATE_AW and CREATE_AWXML may be called directly from custom code or from the concurrent program triggered by the request set.

In 12.1.1 and 12.2.2, customizations should treat the package as an internal Oracle API. The parameter signatures are defined in the package specification (QPRUCAWS.pls), and callers must supply a valid price plan ID and handle the error buffer and return code. Because the package uses AUTHID CURRENT_USER, privileges are resolved at runtime, so invoking sessions require appropriate execute and OLAP privileges. Duplicate-creation risk should be guarded by checking AW_EXISTS before calling CREATE_AW. Direct modification of QPR_* tables is not recommended; the package is the supported interface for AW generation.