CopyMIEvent macro

The CopyMIEvent macro is used to copy the MI Events; from a Source cycle period to a Destination cycle period. This macro is executed at a scenario level.

The macro copies the Approved and Pending Market Intelligence events from source to destination cycle period. The Pending events (which are not editable) can only be copied if the user is part of the editable share of the source scenario.

The MI events copied include the Market Intelligence Measures, the Market Intelligence Event, and the note created against the MI Event.

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

CopyMIEvent(Source Cycle,[Source Cycle period],[Source Module], Source Scenario Name, [Source Measure Code], [Item hierarchy node],[Location hierarchy node],[Period label],[Destination Measure code],[Reference],[Use Destination Hierarchies).
Note: The optional parameters are specified in [ ].

The macro parameters determine the MI Events to be copied. This table lists the parameters used to execute the CopyMIEvent macro:

Parameter Name Description
Source Cycle The Cycle from which the MI events are copied.
Source Cycle period The Cycle period from which the MI Events are copied.
Note: If this value is not specified, the currently running Cycle period for the specified Cycle is considered. If there is no Cycle period with Running status, an error message is displayed.
Source module The module in the source cycle period containing the source scenario, from which the MI Events are copied.
Note: If this value is Null or not specified, the destination module is considered.
Source Scenario Name The Scenario name from which the MI Events are copied.
Source Measure Code The measure to be copied.
Note: If this value is not defined, all published, subscribe and internal Market Intelligence measures for Source module (Source Scenario) are considered.
Item Hierarchy node The items selected for copying.
Note: If this value is Null or not specified, all items are considered.

If ‘Use Destination Hierarchy’ = False or is not defined:

  • The selection of Items refers to nodes in the Item hierarchy of the Source Cycle period and must exist in the Source cycle period.
  • If Item Hierarchy node is specified, MI Events which exist at Items (equal to or children of) that are part of the selection (derived from the Item hierarchy of the source Cycle period) are copied to the destination.

If ‘Use Destination Hierarchy’ = True:

  • The selection of items refers to the nodes in the Item hierarchy of the Destination Cycle period and must exist in the Destination cycle period.
  • If Item Hierarchy node is specified, MI Events which exists at items (equal to or children of) in the Source Cycle Period that are part of the selection (derived from the Item hierarchy of the destination Cycle periods) are copied to the destination.
Location Hierarchy node The locations selected for copying.
Note: If this value is Null or not specified, all locations are considered.

If ‘Use Destination Hierarchy’ = False or is not defined:

  • The selection of locations refers to the nodes in the location hierarchy of the Source Cycle period and must exist in the Source cycle period.
  • If Location Hierarchy node is specified, MI Events which exist at Locations (equal to or children of), that are part of the selection (derived from the location hierarchy of the source Cycle Period) are copied to the destination.

If ‘Use Destination Hierarchy’ = True:

  • The selection of locations refers to the nodes in the location hierarchy of the Destination Cycle period and must exist in the Destination cycle period.
  • If Location Hierarchy node is specified, MI Events which exist at Locations (equal to or children of), in the Source Cycle period that are part of the selection (derived from the location hierarchy of the source Cycle Period) are copied to the destination.
Period label The period duration to be copied. This supports the rolling period nodes.

If ‘Use Destination Hierarchy’ = False or not defined:

  • The period label refers to the period label in the Source cycle period calendar and must exist at the Source cycle period.
  • If specified, only the Events within the date range (including Start date and End date) of the specified Calendar period (bucket) in the Source Cycle period calendar are copied.
  • If the value is not defined or Null, all horizon for the source cycle is considered.

If ‘Use Destination Hierarchy’ = True:

  • The period label refers to the period label in the Destination Cycle period calendar and must exist at the Destination cycle period.
  • If specified, only the Events within the date range (including Start date and End date) of the specified Calendar period (bucket) in the Destination Cycle period calendar are copied.
  • If the value is not defined or Null, all horizon for the destination cycle is considered.
Destination Measure code The Market Intelligence measure of the destination cycle period.
Note: If this value is not defined, the value of Source measure code is considered.
Reference The MI Events that are referenced. Only the Events with the reference are considered.
Note: If this value is not specified, all Events are considered.
Use Destination Hierarchy Indicates, if the hierarchies in the destination cycle period are considered. Possible values:
  • TRUE: The parameters refer to the hierarchies in the destination cycle period.
  • FALSE: The ‘Item hierarchy node’, ‘location hierarchy node’ and ‘period label’ refer to the hierarchies in the source cycle period.

This table lists examples of the CopyMIEvent:

Requirement Syntax

Copy all valid MI Events with reference "Supplier MI" from Demand-Baseline in the Normal May16 cycle period to the current scenario for all items (in Destination cycle period) at “UK” location (in Destination cycle period) for FY 2016. All Events at and below "UK" Location (in destination) and Items at and below "All Items" (at destination cycle period) and have a start and end date within FY 2016 bucket in destination cycle period are copied. The splashed MI values for the measure are copied. Also, the Notes for the Events are copied.

CopyMIEvent("Normal","May16,"","Demand-Baseline","","All Items","UK","FY 2016","","Supplier MI","","TRUE")
Copy all Events created for the MI_1 measure from Finance-Baseline in the Normal May11 cycle period to the current scenario for all items (in Source cycle period) at all locations (in Source cycle period) for the Source cycle periods horizon. All MI_1 Events as well as the splashed MI values for the MI_1 measure are copied. Also, the Notes for the Events are copied. CopyMIEvent("Normal","May11","","Finance-Baseline","MI_1","","","","","","","FALSE")
Copy all events created for the MI_1 measure from the Finance-Baseline in the Normal May11 cycle period to the current scenario for all items (in Source cycle period), at all locations (in Source cycle period) for the Source cycle periods horizon to the MI_2 measure. All MI_1 Events as well as the splashed MI values for the MI_1 measure are copied to the MI measure MI_2. Also, the notes for the Events are copied. CopyMIEvent("Normal","May11","","Finance-Baseline","MI_1","","","","MI_2","","","")