CallReplenishmentEngine macro command
The CallReplenishmentEngine macro is used to call the Replenishment engine for the cycle
to generate the planned orders for an item, location selection (or filter) from the current
cycle period start date including Offset up to a specified horizon. This macro is executed at
a scenario level.
These optional parameters are used for the macro:
- Item hierarchy selection
- The base elements of the selection are used to generate orders. The value can
be a single element and passed as a node. For example, ‘Brand A’.Note:
- If no value is selected, all the valid items are processed.
- You must adhere to the data security rules of the user when selecting the items.
- Location hierarchy selection
- The location for which the orders are generated. The value can be a single
element [element1] or a set {[element1] [element2]}.Note:
- If no value is selected, all locations are processed.
- You must adhere to the data security rules of the user when selecting the items.
- Order Start Offset (days)
- The number of days offset from which the order generation is started.Note: If no Offset (zero offset) is specified, the orders are generated from the first day of the current period.
- Requirements Horizon (days)
- The number of days from the first day of the current cycle period which can
be considered in the requirement planning.Note:
- If no value is specified, the future horizon (in days) is used.
- The orders are only created from the Order Start Period.
- Filter
- If specified, the filter is applied to the item and location selections. Only those base item@location that pass the criteria will be used in the generation of the recommended orders. Null = no filter applied.
For executing the macro, the value of the Command field must be specified in this format:CallReplinishmentEngine([Item Hierarchy selection], [Location Hierarchy selection], [Order Start Offset],[Requirements Horizon],[Filter])
Requirement | Parameter |
---|---|
Calculate orders for all items and locations, filtering the item@location resultant selection based on RPLS_SCHED_RULE = 1, considering the first 60 days from the current cycle period, and generating orders after the first 5 days (current cycle period start date + 5 days). |
CallReplenishmentEngine("","","5","60","[RPLS_SCHED_RULE] = 1") |
Calculate orders for all items beneath Item top node (primary hierarchy) at the Location top node (primary hierarchy), starting from the start of the current period and generating orders until the end of the future horizon. | CallReplenishmentEngine("%ItemTopNode","%LocationTopNode","","","") |
Calculate orders for all items beneath Item top node (primary hierarchy) at locations "UK" and "France", starting from the start of the current period and generating orders until the end of the future horizon. | CallReplenishmentEngine("%ItemTopNode","[UK],[France]","","","") |
Validations are performed when you execute the macro. If any of the validation fails, the macro is aborted and the related error message is displayed.
This table describes the Scenario Macro commands as compared to Cycle Period/Scenario Status
and validation messages.
Cycle Period status | Scenario status | Can Execute? | Validation message |
---|---|---|---|
Pending | N/A | No | Cannot run macro {0} because Cycle Period has status ‘Pending’ |
Running | WIP | Yes | N/A |
Running | Review, Rejected, Stopped, Approved, Published | No | Cannot run macro {0} because Scenario has status {1} |
Paused | Any | No | Cannot run macro {0} because Cycle Period is not running |
Completed | Any | No | Cannot run macro {0} because Cycle Period has status ‘Completed’ |
Aborted | Stopped | Yes | Cannot run macro {0} because Cycle Period has status ‘Aborted’ |
Archived | Any | No | Cannot run macro {0} because Cycle Period has status ‘Archived’ |
This table describes the error message displayed during the macro execution. The errors
reported from the Replenishment engine are notified to the job manager and also available
through the audit log as a discard log of the Replenishment engine processing.
Validation | Validation Message |
---|---|
Check the Replenishment engine name exists. | Replenishment Engine defined for Cycle {1} cannot be found. |
Check the Replenishment engine is accessible to the user. | Replenishment engine {0} is not accessible to user {1} |
Where specified, ensure the item nodes are valid. | item {0} cannot be found. |
Where specified, ensure the location nodes are valid. | location {0} cannot be found. |
Where specified, ensure that the Order Start Offset (days) is a positive integer. | Order Start Offset (days) must be a positive integer. |
Where specified, ensure that the Requirements Horizon (days) is a positive integer. | Requirements Horizon (days) must be a positive integer. |