CallReplenishmentEngine macro
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])
This table lists the parameters used to run the CallReplenishmentEngine macro:
Parameter Name | Description |
---|---|
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:
|
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:
|
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:
|
Filter | If specified, the filter is applied to the item and location selections. Only those base item@location (at period constant (PCONST)) that pass the criteria will be used in the generation of the recommended orders. Null = no filter applied. See, Filter Parameter syntax. |
This table lists the examples of the CallReplenishmentEngine macro:
Requirement | Syntax |
---|---|
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 lists 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’ |
Validation is performed when you execute the CallReplenishmentEngine macro. 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.
This table lists the error message displayed during the macro execution:
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. |