Calling the Replenishment Engine for the current contextual data of a worksheet

Replenishment Engine can be called based on the current contextual data of a worksheet using the toolbar icons. To enable this functionality:

  • Select a standard workseet, with the report source type as Embedded and the report type pivot_editor.
  • Specify the rv_Enable_Replenishment data parameter for the worksheet, with value = True. The worksheet displays the toolbar icons, Calculate Schedule and Calculate Schedule with options.
  • A valid Replenishment Engine must be enabled for the current cycle.
  • The current user or role must have the permission: Execute Calculate Schedules in [Module])
To calculate the schedules, access the Worksheet by selecting Cycle or Cycle-Module. When the rv_Enable_Replenishment parameter is defined and other prerequisites are met, these options are displayed on the worksheet toolbar:
Calculate Schedule using default engine
Use this option to call the default engine directly. A dialog box is displayed which indicates the progress of the Calculate Schedule. The worksheet is updated after the completion of the process. For more information, see Calculate Schedule with default engine.
Calculate Schedule using options
Use this option to display the Calculate Schedule dialog box. For more information, see Calculate Schedule with options.
If a user, or all assigned roles, do not have access to the replenishment engine defined in the engine property, this error message is displayed:
Replenishment engine {0} is not accessible to user {1} 
If the replenishment engine's tag is not enabled for the current cycle, this error message is displayed:
Replenishment Engine {0} defined for cycle {1} cannot be found.

Calculate Schedules using the default engine

Click Calculate Schedules . The replenishment engine defined for the Cycle is called with these default values:

  • Item element selection: Worksheet content
  • Location element selection: Worksheet content
  • Order Start Offset (days): Default value is 0
  • Requirement Horizon (days): Cycle's future horizon (converted to days)

The progress status of Calculate Schedules is displayed on a pop-up window.

Note: 
  • If the schedule is completed without errors or exceptions from the replenishment engine, the dialog box closed automatically.
  • If the process is completed with either errors or exceptions, warning messages are displayed. The dialog box can be closed manually after which the Worksheets are refreshed automatically.
  • Validation of replenisment engine settings is based on the standard call to the CallReplenishmentEngine macro. For more details, see Scheduling an item and Location using standard scheduling.

These are the command examples:

  • User can select Calculate Schedule with the worksheet:
    • Context Item set to All items
    • Context Location set to EMEA
    • Cycles Replenisment Engine = Standard Engine
    • Cycle Period start date = 01/10/2016
    • Requirements Horizon (Cycle's Future horizon) = 52
    • Order Start Offset = 0
  • CallReplenishmentEngine (All items, EMEA, 0, 50)

Calculate Schedule with options

  1. Click Calculate Schedules with options. A dialogue box is displayed.
  2. Specify this information:
    Field Name Default Value Comments
    Replenishment Engine Cycle’s Replenishment Engine The Replenishment Engine defined for the selected cycle.
    Current Period Start date Cycle Period Start Date The first day of the current period.
    Order Start Offset (days) 0 The number of days offset, before orders are generated. You can adjust the value based on the Requirements horizon.
    Requirements Horizon (days) Cycle’s Future Horizon converted to days The value that can be any number > 1 up to the Cycle’s Future Horizon (in days). The value must be equal to or greater than the value specified in the Order Start Offset field.
    Items Worksheet context Item selection The items (from the worksheet context) to be considered for the calculation process.
    Locations Worksheet context Item selection The locations (from the worksheet context) to be considered for the calculation process.
    Note: This value can be overridden if the Include All Location option check box is selected.
    Include All locations Off If this check box is selected, the context location is not considered and all locations are used to calculate the schedules.
  3. Click OK. The CallReplenishmentEngine command is called, based on the data specified. These parameters are passed to the CallReplenishmentEngine command:
    • Item element selection: Worksheet content
    • Location element selection: Worksheet content
      Note: If Include All Locations check box is selected in the Calculate Schedule with options dialogue box, the Location element selection parameter overrides the worksheet context and Null is passed to the engine, indicating that all locations must be considered.
    • Order Start Offset (days): Selected in Calculate Schedule dialog box.
    • Requirements Horizon (days): Selected in Calculate Schedule dialog box.
  4. Click OK. A pop up window is displayed to track the progress of the schedule calculation.
    Note: 
    • If the schedule completes without errors or exceptions from the replenishment engine, the window closed automatically.
    • If the schedule process is completed with errors or exceptions, error message is displayed. The window can be closed manually after which the worksheets are refreshed automatically.