Schedule Model and Forecast
You use the Schedule Model and Forecast
function to create, schedule, and run jobs for demand modeling and demand forecasting and to calculate hierarchical priors. Modeling, forecasting, and hierarchical priors are services provided by the Unified Demand Forecast (UDF) module in SAP Customer Activity Repository.
Output of the Results
The function does not display the generated demand models and demand forecasts. It is designed solely for the creation and running of the jobs, not the inspection of the output.
UDF provides the sap.is.ddf.udf.viz/CV_POS_TS
SAP HANA view with generated forecast information to the consuming application. Note that you can view and manage SAP HANA views in SAP HANA studio.
An optional visualization tool for forecast validation is available. For more information, see Validate Forecasts with UDF Launchpad.
You can run and schedule the following services with this function:
Model By Hierarchy
Model By Product Location
Forecast by Hierarchy
Forecast by Product Location
Calculate Hierarchical Priors
When you schedule a service by hierarchy, you get all products and locations assigned to that hierarchy branch.
When you schedule a service by product location, you specify a list of one or more products and one or more locations.
For more information about the services, see Unified Demand Forecast (UDF).
You can check the status of your modeling and forecasting services using a dedicated report (/DMF/MOD_STATUS_REP
). You can display the statuses, statistics, exception messages, and contents of the associated jobs and tasks. For example, you can check for failed tasks and then resubmit them using the Resubmit Failed Tasks
field.
For more information, see the report documentation (transaction SE38).
Variants allow you to specify settings for a service and then save them for later reuse.
Follow these steps:
Choose Variant Setup
.
Select the service that you want to run.
Enter a name for your variant.
Select the master data system that contains the data that you wish to use.
Choose Variant Detail
to specify the data that you wish to process.
Save your settings.
Recommendation
If you are new to demand modeling and forecasting, start by creating variants that correspond to the lower nodes of your product and location hierarchies to create smaller, shorter, and more manageable jobs.
As you become more experienced with these jobs, you can schedule them to recur regularly to run modeling on non-overlapping data sets.
Never start by modeling the entire enterprise because this is a long-running job.
Follow these steps:
Choose Process Setup
.
Select the variant that you wish to use.
Inspect the Variant Detail
settings to make sure this is the data that you wish to process.
Select the criteria that you wish to use (for example, Service Name
).
Select an execution mode. For more information about execution modes, see the following section.
Execute the job.
Note
The modeling and forecasting services respect the configuration settings in the Configure Load Balancing
function. For more information, see Configure Load Balancing.
You can run jobs in one of the following execution modes:
Start Immediately
(foreground)
Your variant and selection criteria will be used to run the process in the foreground. Use this mode for jobs when you already know how long they will require to run so that they do not exceed the maximum time allowed for a foreground process. A job that exceeds the maximum time might be terminated automatically by the ABAP system. When the mode is done, it displays a success or error message.
Schedule Single Execution
(background)
Your variant and selection criteria will be used to schedule a one-time background process to be run at the date and time in the future that you specify. This mode only submits the job and displays the job ID. It does not actually run the job. The system will start the job at the specified time.
Schedule Recurring Execution
(background)
Your variant and selection criteria will be used to schedule a recurring background process to be run at the date and time and frequency that you specify. This mode only submits the job and displays the job ID. It does not actually run the job. The system will start the job at the specified time and continue to run it at the specified frequency until you cancel the job.
Recommendation
You should schedule modeling and forecasting at times when they are least likely to impact or coincide with other operations (such as master data imports).
You can measure forecast accuracy by running holdout forecasts. A holdout forecast allows you to compare the generated forecast against actual sales data. You withhold some of this data from being considered in the modeling and forecasting processes for that period, and then you compare the results to the actual sales data that was withheld. Holdout tests are best suited for measuring forecast accuracy in a proof-of-concept, pilot, or periodic analysis.
Note that holdout forecasts are only available in diagnostic mode and do not affect your production forecast results. To perform a holdout forecast, follow these steps:
Specify a diag_ID
specific to your user.
Select a date for the Model End Date
field based on the holdout period that you want to compare.
Model the selected products and locations.
Enter the Forecast Horizon Start Date
for the holdout period and create a forecast. Note that the forecast results are persisted in the Demand Data Foundation (DDF) data layer in SAP Customer Activity Repository.
Optionally, you can export the data into a reporting format of your choice using the CV_POS_TS
view in the sap.is.ddf.udf.viz
SAP HANA content package.
Example
You have 1 year of historical sales data (actuals): from July 1, 2013 through June 30, 2014. You want to hold out 3 months of your actuals to assess the values that will be forecasted. You create a diag_ID
and set the scope for your test, specifying the products and locations. You set the Model End Date
date to March 31, 2014 and the Forecast Horizon Start Date
to April 1, 2014 with a duration of 90 days. You run modeling and forecasting and then validate the results against the actuals.
You can monitor jobs using the Search for Scheduled Jobs
service or transaction SM37. You can see the status of your jobs, cancel jobs, and review the job log for details of their execution and other operations. To find the desired job, use the Job Name
and Job ID
criteria.
You can review messages generated during modeling and forecasting using the Monitor Exceptions
function. For more information, see Exception Management.
A data error or system error might cause a job to be canceled. To investigate the causes, you can do the following:
Use the Search for Scheduled Jobs
function: Select the job that appears as canceled and display the job details.
For example, you might see a message saying that a SQL error has occurred. You can view this error in the system log (transaction SM21) to investigate further.
Use the Monitor Exceptions
function: Search for your job ID and display all messages involved in the job. Take a look at the message long texts to see further details.
For example, a message might say that forecast decomposition has failed. Here, the most likely cause is a data issue (such as an invalid product location or missing sales data).