Search Results copy_dp_forecast
Overview
MSC_CL_COPY_DP_FORECAST is an Oracle E-Business Suite PL/SQL package owned by the APPS schema that supports the Advanced Supply Chain Planning (ASCP) and Demand Planning (DP) product family. Its functional purpose is to copy demand planning forecast data between two Oracle EBS instances or planning instances. The package operates against the MSD_DP_* tables, which are the Demand Planning staging and scenario tables used by the Demand Planning module that accompanies ASCP.
The package is defined with AUTHID CURRENT_USER, meaning that its stored procedures execute with the privileges of the invoking user rather than the package owner. This is a common pattern for utility packages that must access synonyms and objects visible to the calling session, and it aligns with the observed use of APPS synonyms such as MSC_APPS_INSTANCES and the MSD_DP_* tables in the package body.
The header comment identifies the source file as MSCDPCPS.pls at version 120.1.12010000.1, dated 2009/08/28, which places the package in the 12.1.x code line; the same object is present in EBS 12.2.2. It is a source-copied utility package rather than a public, published API, so it is classified as OTHER in ETRM.
Key Procedures and Functions
The package exposes six documented procedures. Their purposes are as follows.
- LAUNCH_MONITOR — The entry point that starts and monitors the copy process. It accepts an error buffer and return code (OUT NOCOPY), an instance identifier, and a source instance identifier, so it is intended to be called from a concurrent program or an external launcher with runtime parameters identifying the source and target instances.
- COPY_DP_FORECAST — Copies the primary demand planning forecast data from MSD_DP_SCN_ENTRIES_DENORM, the denormalized scenario entries table. The body comment explicitly states this purpose.
- COPY_DP_SCENARIOS — Copies the scenario definitions from the MSD_DP_SCENARIOS table.
- COPY_DP_SCENARIO_REVISIONS — Copies scenario revision records from MSD_DP_SCENARIO_REVISIONS.
- COPY_DP_DEMAND_PLANS — Copies demand plan definitions from MSD_DEMAND_PLANS.
- COPY_MSD_DP_SCENARIO_OP_LEVELS — Copies the scenario output level configuration from MSD_DP_SCENARIO_OUTPUT_LEVELS.
A commented-out procedure, PURGE_ALL_FORECAST, appears in the source but is not part of the active API surface. No parameter lists are documented for the copy procedures; the metadata provided lists their names and purposes only.
Tables Accessed
The package reads and writes the Demand Planning tables exposed through APPS synonyms. MSD_DP_SCENARIOS holds scenario headers, MSD_DP_SCENARIO_REVISIONS holds revision history, MSD_DEMAND_PLANS holds demand plan definitions, and MSD_DP_SCENARIO_OUTPUT_LEVELS holds the output level groupings assigned to scenarios. MSD_DP_SCN_ENTRIES_DENORM is the denormalized fact table containing the actual forecast entries that are the payload of the copy. MSC_APPS_INSTANCES identifies the source and target EBS applications instances, which is how the package distinguishes a copy from one instance to another. DBMS_RANDOM and DUAL are referenced as supporting utilities, typically for generating unique keys or sequence-like values during insert operations.
Usage Notes
MSC_CL_COPY_DP_FORECAST is not a published interface and is referenced by no other packages in the ETRM inventory. It is invoked indirectly, most commonly from a concurrent program in the Demand Planning responsibility that copies scenarios, revisions, demand plans, and forecast entries from a source instance to the current instance. This pattern is used to migrate or replicate Demand Planning setup and forecast data between a production and a test instance, or between planning instances during implementation and upgrade projects.
Because the package relies on MSC_APPS_INSTANCES to resolve source and target instances, the target instance must be registered in that table before invocation. On EBS 12.1.1 the package is deployed under the APPS schema in the MSC product directory; on 12.2.2 the same PL/SQL object is installed in the APPS schema against the online patching edition. Custom code should not call the copy procedures directly unless the calling session holds the necessary synonyms and privileges, since AUTHID CURRENT_USER means the invoker's schema rights govern execution. The supported path is through the packaged concurrent program wrapper, which supplies the instance IDs through LAUNCH_MONITOR.