Show TOC

Function documentationSchedule Model and Forecast

 

You use the Schedule Model and Forecast function to create, schedule, and run demand modeling and forecasting jobs 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. For more information, see Unified Demand Forecast.

Note Note

To access this function on the SAP Easy Access screen (transaction nwbc), choose Start of the navigation path Services Next navigation step Schedule Model and Forecast End of the navigation path.

End of the note.

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.

  • You can view detailed modeling and forecasting information using the Analyze Forecast SAP Fiori app. For more information, see Analyze Forecast.

  • Additionally, an optional visualization tool is available. For more information, see Validate Forecasts with UDF Launchpad.

Features

Available Services

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.

Variants

If you regularly use the same settings for a particular service, you can save those settings as a variant and then call up the variant again whenever you need it.

Activities

Creating a Variant
  1. Choose Variant Setup.

  2. Select the service that you want to run.

  3. Enter a name for your variant.

  4. Select the master data system that contains the data that you wish to use.

  5. Choose Variant Detail to specify the data that you wish to process.

  6. Save your settings.

Recommendation 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.

End of the recommendation.
Executing Jobs Using Variants
  1. Choose Process Setup.

  2. Select the variant that you wish to use.

  3. Inspect the Variant Detail settings to make sure this is the data that you wish to process.

  4. Select the criteria that you wish to use (for example, Service Name).

  5. Select an execution mode. For more information about execution modes, see the following section.

  6. Execute the job.

Note Note

The modeling and forecasting services respect the configuration settings in the Configure Load Balancing function. For more information, see Configure Load Balancing.

End of the note.
Selecting an Execution Mode

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 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).

End of the recommendation.
Monitoring Jobs

You have several options for monitoring the jobs that you create with this function:

  • You can use the Search for Scheduled Jobs function on your SAP Easy Access screen (transaction nwbc) 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. For more information, see Search for Scheduled Jobs.

  • You can use the Monitor Exceptions function to review messages generated during modeling and forecasting. For more information, see Exception Management.

  • You can use the /DMF/MOD_STATUS_REP report to check the status of your modeling and forecasting jobs. 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).

  • If tasks fail during modeling or forecasting jobs or during the calculation of hierarchical priors, you can set the system to automatically resubmit such tasks for processing. Please note that this is an advanced configuration. To activate the automatic retry for a particular job, use transaction SM30 and open the required maintenance view: /DMF/V_UMD_CFG (for modeling), /DMF/V_HPR_CFG (for hierarchical priors), /DMF/V_UFC_CFG (for forecasting). Set the MOD_SQL_RETRY_MAX and MOD_SQL_RETRY_TIMEOUT configuration types as required. For performance reasons, we recommend that you use a conservative approach when configuring the number of times that you want the system to retry.

Investigating Errors

A data error or system error might cause a job to be canceled. To investigate the causes, you can do the following:

  1. 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.

  2. 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).

Performing Holdout Forecasts

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:

  1. Specify a diag_ID specific to your user.

  2. Select a date for the Model End Date field based on the holdout period that you want to compare.

  3. Model the selected products and locations.

  4. 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.

  5. Optionally, you can export the data into a reporting format of your choice using the CV_POS_TS calculation view in the sap.is.ddf.udf.viz SAP HANA content package.

Example 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.

End of the example.