Validation and execution

The copy of the existing Planning Engine is created on successful validation and execution of the macro. The name specified in the Planning Engine parameter is considered as the name of the copied Planning Engine..

The Planning Engine name and Planning Engine Display name parameters may use variables which assist in determining the Planning Engine name and display name. Typical parameter variables used are:

  • %source%: Source Planning Engine name (when used in Planning Engine name), or Source Planning Engine Display name (when used in Planning Engine Display name)
  • %date%: UTC date at run-time in ‘yyyymmdd’ format
  • %time%: UTC time at run-time in ‘hhmiss’ format (24-hour clock)
  • %datetime%: UTC date and time at run-time in ‘yyyymmdd hhmiss’ format
  • %PlanningEngineCycle%: the name of the Planning Engine cycle in the current context
  • Application variables can be used and are substituted at run time.
  • For additional parameter variable. See, Parameter variable.

The Planning Engine includes all the information from the source Planning Engine and can be modified. The value of Category is overwritten with the value specified in the Category parameter, if defined. Else, the Category of the source Planning Engine is considered.

The value of Display Name is overwritten with the value specified for the Display Name parameter. Else, the Display Name is not populated.

Example:

Requirement Parameters
Make a copy of "Weekly Supply Plan 2020-03-17" called "Weekly Supply Plan 20200324" (where 20200324 is today's UTC date) with the same category of the source. The display name of the planning engine is set to null. CopyPlanningEngine("Weekly Supply Plan 2020-03-17","Weekly Supply Plan %date%","","")