CopyScenarioData macro

The CopyScenarioData macro is used to copy the measure data between scenarios and measures that are related to the same Cycle Period and Module. This macro is executed at a scenario level.

When a source level (for which a node parameter is not selected) is copied, the const element for that dimension along with the scenario value of the scenario values of the measures of these elements are also copied.

The macro parameters determine the measure data to be copied, the source Cycle Period, Scenario, module and the destination Cycle Period, Scenario, module.

For executing the macro, the value for the Command field must be specified in this format:

CopyScenarioData (Source Scenario Name, [Source Measure Code], [Item Hierarchy Node], [Location Hierarchy Node], [Period label], [Destination Measure Code], [Overwrite])
Note: The optional parameters are specified in [ ].

This table lists the parameters used to execute the CopyScenarioData macro:

Parameter Name Description
Source Scenario Name The scenario from which the measure data is copied. This can be the current scenario.
Source Measure Code The measure code to copy.
Note: If this value is not specified all published, subscribed and internal measure including business metrics, transactional data/order and Market Intelligence measures for this module are considered.
Item hierarchy node The item node to copy.
Note: 
  • If specified, the children of the passed node at the item hierarchy level for storing the scenario values are considered.
  • If this value is not specified, all items including iconst are considered.
Item hierarchy node The location node selected for copying.
Note: 
  • If specified, the children of the passed node at the base level are considered.
  • If this value is not specified, all locations including Iconst are considered.
Period Label The period to be copied.
Note: 
  • If specified, all the children of the passed node at the calendar level for storing the scenario values are considered.
  • If this value is not specified, all horizon for this cycle period including pconst are considered.
Destination Measure Code The measure in the destination cycle period to copy to.
Note: 
  • Market Intelligence and Transactional Data/Order type measures are supported only when the source measure is of the same type.
  • If this value is not specified, source measure code is considered.
Overwrite Indicates, if the data at the destination is overwritten with the source data. Possible values:
  • TRUE: The data at the destination is overwritten with the source data. The existing data in a destination cell is retained, if the source value is zero or null.
  • FALSE: The data from the source is added to the data at destination.
Note: By default, this value is set to FALSE.

This table lists examples of the CopyScenarioData macro:

Requirement Syntax
Copy the BREV measure from Finance-Baseline to the current scenario for all items at all locations for the cycle period horizon. This includes iconst, lconst and pconst values as no parameter filters exist. CopyScenarioData("Finance-Baseline","BREV","","","","","")
Copy all published and internal measures from Finance-Baseline to the current scenario for GOO items at all locations for the cycle period horizon. This includes lconst and pconst values as no parameter filters exist. CopyScenarioData("Finance-Baseline","","GOO","","","","")
Copy all published and internal measures from Supply-Baseline to the current scenario for all items at All DCs locations for the cycle period horizon. This includes iconst and pconst values as no parameter filters exist. CopyScenarioData("Supply-Baseline","","","All DCs","","","")
Copy all published and internal measures from Demand-Baseline to the current scenario for all items at all locations for the duration of the calendar period "FY 10" (at the cycle calendar level to store values). This includes iconst and lconst values as no parameter filters exist. CopyScenarioData("Demand-Baseline","","","","FY 10","","")
Copy the BREV measure from Finance-Baseline to the current scenario for GOO items at US locations for the duration of the calendar period "FY 10" (at the cycle calendar level to store values). CopyScenarioData("Finance-Baseline","BREV","GOO","US","FY 10","","")
Copy the BREV measure from Finance-Baseline to the FREV measure for the current scenario for GOO items at US locations for the duration of the calendar period "FY 10" (at the cycle calendar level to store values). CopyScenarioData("Finance-Baseline","BREV","GOO","US","FY 10", "FREV","")
Finance-Uplift is the current scenario. Copy the BREV measure from Finance-Uplift to the FREV measure for the current scenario (Finance-Uplift) and for GOO items at US locations for the duration of the calendar period "Current Year" at the cycle calendar level to store plans. CopyScenarioData("Finance-Uplift","BREV","GOO","US","Current Year", "FREV","")
Copy the Transactional data "Planned_Production" from SPlus-Baseline to current scenario for all items/locations for cycle period horizon.
Note: This copies the scenario values for the associated transactional data (both the source and destination measure within the transactional Data). The transactional data record is also copied.
CopyScenarioData("Splus-Baseline","Planned_Production","","","","","")
Copy the Market Intelligence data "DPLS_FMI_EVENT" from DPlus-Baseline to current scenario for all items/locations for cycle period horizon.
Note: This copies the Market Intelligence data and re-applies the Event.
CopyScenarioData("Dplus-Baseline","DPLS_FMI_EVENT","","","","","")