Knowledgebase

Schedule MRP Refresh

MRP and Demand Schedule do not display real-time data; each should be refreshed for MRP to update its recommendations.

Demand Schedule and MRP can both be refreshed manually, using Refresh Demand Schedule and Refresh MRP.

But it is recommended to run these refreshes when other users are not in Sage, which is often overnight.

Using the Schedule MRP Refresh screen, a schedule can be setup to automatically refresh either Demand Schedule, MRP or both together.

Before you begin

Ensure you have setup the Planning module as required for MRP:

  • Go to Cim200 Planning > Utilities > System Set Up > Maintain Planning Settings | General to configure default settings for refreshing Demand Schedule and MRP.

To refresh MRP

Open: Cim200 Planning > Utilities > System Set Up > Schedule MRP Refresh

1. Review settings for refreshing MRP. Some settings are defaulted from Maintain Planning Settings but can be changed as required.

Schedule Demand Schedule : Tick to automatically refresh the Demand Schedule.

Schedule MRP Refresh : Tick to automatically refresh the MRP. When refreshing MRP it is usually recommended to also refresh the Demand Schedule.

Days To Run : Tick each day to select which day(s) of the week the schedule should run.

Start Time : Set the time of day each refresh will begin. It is recommended to select a time that Sage 200 is not expected to be in use.

Include Demand From : If All Demand Sources is ticked, all sources of demand are considered during the refresh. If not ticked, tick each individual source for inclusion in the refresh.

Include Replenishments From : Configure which replenishment sources to include in the MRP refresh. It is usually recommended to include all sources. To only include certain sources, untick All Replenishment Sources and tick each required source.

Include Proforma Orders : If this option is ticked, Proforma Sales Orders are included as firm demands and will be planned.

Exclude SOs Raised via Quotations : If this option is ticked, Sales Orders which have been created from Quotations will be excluded from the Demand Schedule.

Exclude ‘On Hold’ SOs : If this option is ticked, Sales Orders with Status set to On Hold will be excluded from the Demand Schedule and will not be planned.

Refresh MRP for : MRP should usually be run for all items, to ensure that all demands and replenishments are captured by MRP before it makes recommendations. Use this setting for testing and what-if scenarios, to run MRP only for Specific Stock Records, Specific Sales Orders or Specific Works Orders.

  • Selecting a ‘Specific…’ option will allow the user to specify which records to include by choosing the required saved filter. Filters must first be created in the relevant list view.
  • For specific stock items, saved filters for the Cim200 Stock Control List view can be selected for use.
  • Specific Sales Orders uses filters for the Sales Orders List.
  • Specific Works Orders uses filters for the Cim200 Works Orders List.

2. Click Save to save the schedule.

Setup Scheduled Task (On-Premise Setup)

Once a refresh schedule has been set in this screen, there are further steps to setup a Windows Scheduled task to perform the automatic refresh.

The required steps are as follows:

  1. Navigate to <<Sage Share>>\Cim200\MRPScheduler folder.  It is populated with the Cim200.MRPSchedule.exe which runs the refresh.
  2. Unzip the following file into the MRPScheduler folder: <<Sage folder>>\Installers\Sage 200 Client\Sage200Client.zip
  3. Also in the MRPScheduler folder create a new .BAT file.  Edit this file and add a line to point the scheduled task to the required file and either the Sage company name or the SQL Server database name for the company. For example: “C:\Sage\Cim200\MRPScheduler\Cim200.MRPSchedule.exe” “Sage200_DemoData” – Please ensure you have manually typed the quotation marks into the file instead of copying and pasting from this article. Batch files do not recognise decorative quotes as valid characters.
  4. Create a new Windows Scheduled Task on the Sage Server.  Set it to run the BAT file just created, and to run regularly: for example, every hour.  Having it check every hour will ensure that it will still run the refresh even if the Start Time is changed in the Schedule MRP Refresh screen.
  5. The program will check if the Demand Schedule or MRP have already been run that day; if not then it will run the refresh as defined in the Schedule MRP Refresh screen.
  6. Once the refresh(es) have been completed, the list view(s) in Sage will be updated to show the last refresh date & time.

Note: The Scheduled Task should be configured with the option ‘Run with Highest Privileges’ ticked.

Setup Scheduled Task (Sage Partner Cloud)

Once a refresh schedule has been saved in this screen, a Windows Scheduled Task must be created to perform the automatic refresh.

  1. Navigate to the <<Sage Share>>\Custom\Cim200\MRPScheduler folder. This contains Cim200.MRPSchedule.exe, which performs the refresh. Leave this folder open.
  2. Navigate to C:\Program Files\Sage200\Desktop – Select all files in this folder, copy them, and paste them into the MRPScheduler folder.
    Note: repeat this copy step after each Sage 200 upgrade, so the scheduler runs the same version as the desktop.
  3. In the MRPScheduler folder, create a new .BAT file (recommended name: Cim200MRP.BAT). Edit it and add a single line: the full path to the exe, followed by either the Sage company name or the SQL database name of the company, each in quotes.For example: “<<Sage Share>>\Custom\Cim200\MRPScheduler\Cim200.MRPSchedule.exe” “Sage200_DemoData”
    Please type the quotation marks manually rather than copying them from this article – curly “smart” quotes are not valid in batch files.
  4. Press Start > Run, type taskschd.msc and click OK to open Windows Task Scheduler.
  5. Create a new task that runs the .BAT file regularly – for example, every hour. The refresh itself only runs once per day, on the scheduled days, once the start time has passed – so an hourly check simply ensures a changed start time is still picked up the same day.
  6. On the task’s General tab, select “Run whether user is logged on or not” and enter your Windows password when prompted – without this, the overnight refresh will not run. The task must run as a Windows user who is also a Sage 200 user with access to the target company.
  7. To verify the setup, right-click the task and choose Run, then check the log file created in the MRPScheduler folder (yyyymmdd_Cim200_MRPSchedule.log).

The program checks whether the scheduled refresh has already run that day; if not, and the scheduled start time has passed, it runs the Demand Schedule and/or MRP refresh as defined in the Schedule MRP Refresh screen. Once complete, the list views in Sage show the new last-refresh date and time the next time they are opened or refreshed.

Tip: when testing, the refresh runs at most once per day. To run it again on the same day, use Planning > Utilities > System Set Up > Clear Planning Flags and clear the Scheduled MRP flag.

Note: The scheduled refresh can only run if the machine hosting the scheduled task is powered on at the scheduled time. On Sage Partner Cloud deployments, virtual machines may be automatically shut down (deallocated) overnight to reduce hosting costs. Check the power management settings in the Azure portal – in particular any scaling plan, auto-shutdown or hibernation configuration – and adjust them so the machine remains available overnight. If the machine is off at the scheduled time, the refresh will instead run at the next hourly check after the machine is started.

Outcomes from Demand Schedule refresh

If the Demand Schedule was refreshed, the Demand Schedule list view is refreshed with latest results, both the Included and Excluded lists.

Quantities in the Time Phased Demand Schedule enquiry will be updated, based on demands included in the latest refresh.

Outcomes from MRP refresh

If the MRP was refreshed, the results can be seen in the MRP List View, which can present the data in several different lists – Recommendations, Exclusions, Demand, Replenishments and Rescheduling.

  • The Recommendations list and Rescheduling list feature recommendations which can be actioned.
  • The Demand and Replenishments lists provide insight into what demands and replenishments underpin these recommendations.
  • The Exclusions list details which demands and replenishments were excluded, and why.

A log file is created, logging full details of the demands and replenishments MRP found and the calculations made to determine which recommendations to make. Access log files from the Output Log button on the MRP List View.

From the Stock Profile screen, the MRP Stock Projection information will be updated to the latest refresh.