Search Results change_output_period




Overview

MSD_APPLY_TEMPLATE_DEMAND_PLAN is an Oracle E-Business Suite PL/SQL package in the APPS schema that supports template-driven maintenance of demand plans within the Demand Planning module of Oracle Advanced Supply Chain Planning (ASCP) and the Enterprise Territory/Supply Chain Management (ETRM) family of applications. The package is declared with AUTHID CURRENT_USER and exposes a public API through which callers can instantiate a new demand plan from an existing template or source plan, or selectively modify the components of an existing demand plan. Its methods fall into two broad categories: plan creation routines (APPLY_TEMPLATE and CREATE_PLAN_USING_TEMPLATE) and component-level maintenance routines that add or remove dimensions, parameters, scenarios, events, price lists, calendars, hierarchies, and scenario output levels. Because the package manipulates rows directly in the underlying MSD_DP_* demand planning tables rather than relying solely on the Demand Planning user interface, it is classified as an OTHER API and is generally intended for controlled, programmatic use rather than ad-hoc execution.

Key Procedures and Functions

The documented public interface contains thirty-seven procedures and functions. Two are constructor-style entry points:

  • APPLY_TEMPLATE — a function that creates a new demand plan by applying the definition of a source plan (p_source_dp_id) to a target plan identified by name and description, returning the new plan identifier through the p_new_dp_id out parameter.
  • CREATE_PLAN_USING_TEMPLATE — a function that builds a demand plan from template attributes including plan type, start and end dates, and an optional associated supply plan, returning a boolean outcome and the new plan id.

The remaining routines are component-level maintenance procedures grouped by the entity they affect:

Tables Accessed

The package reads and writes through APPS synonyms to the following base tables:

Usage Notes

MSD_APPLY_TEMPLATE_DEMAND_PLAN is referenced by three other packages in the APPS schema and is therefore typically invoked indirectly rather than directly. The most common path is through Demand Planning setup or plan-creation flows launched from the Oracle EBS forms or from concurrent programs that provision new plans from a template. Custom code that needs to create, clone, or prune demand plans should call the exposed functions rather than inserting into the MSD_DP_* tables directly, since the package encapsulates the associated set and translation rows. When calling the maintenance procedures, callers must supply the correct parameter_id, scenario_id, or dimension_code; these identifiers are normally obtained by querying the corresponding MSD_DP_* tables (for example, MSD_DP_PARAMETERS) using the demand plan id and the parameter or scenario name. The error code out parameter should be inspected on every call to determine whether the requested change was applied successfully.