Calculate the Best Fitting Forecast with SAP APO Macros, Forecast Errors, and Process Chains

  • by Andreas Gründobler, IT Analyst, OSRAM Opto Semiconductors GmbH (July 2009)
  • July 22, 2009
Learn how to implement a fully automated forecast analysis system with model comparison within SAP Advanced Planning & Optimization demand planning.
Key Concept

A process chain is a series of processes that waits in the background for an event. Some of these processes can trigger a separate event that starts other processes, hence forming a chain. Using a process chain in SAP Advanced Planning & Optimization (SAP APO) enables you to put business logic in these background processes. SAP offers a set of standard functions for process chains for special functions in SAP APO demand planning, such as performing macros in the background. Use of ABAP programs allows you to use any kind of program logic. You can schedule process chains like normal background jobs for batch processing.

Many people have asked me, “Why don’t you use the SAP Advanced Planning & Optimization (SAP APO) functionality for automatic model selection?” This question is easy to answer. SAP APO offers the forecast strategy 50 (automated model selection), but a planner cannot influence the system by choosing a certain strategy since the system decides by itself which strategy to use. In my experience this strategy doesn’t find the best fitting model as it checks only a small set of possibilities and parameters. Wouldn’t it be better if you could select a set of best fitting models in an early project phase and have the system check which model fits the best?

SAP APO macros, forecast errors, and process chains can help you solve this problem. First, predefined SAP APO forecast models help you calculate statistical forecasts for all relevant planning objects. Then, the macros allow you to calculate the mean absolute percentage error (MAPE) for all these possible forecasts. Later you compare the different forecasts by checking the MAPE for each model. Finally, you can release the whole calculation as a background calculation by using SAP APO process chains. These process chains can then calculate the forecast models, compare the MAPEs, and find the best fitting model.

While there are several ways to approach this situation, this article describes a solution I prefer. The solution I describe here offers several advantages. First, for the user, the whole calculation and the model comparison are done in the background, so you don’t have to worry about finding the best forecast model. Next are the technical benefits. In SAP APO each key figure is stored in SAP liveCache. For every third planning object, key figure, and time bucket, one object in the liveCache must be reserved. These objects are known as Time Series.

My method helps to reduce the number of Time Series in the liveCache. Here’s how. Demand planning (DP) often takes place on different aggregation levels. These could be, for example, a material group (bundle of materials with similar characteristics, such as products that are produced on the same capacity line) and the planning material itself (e.g., the different products of a company). One main technical recommendation for SAP APO systems is to keep the planning objects and therefore the amount of Times Series as low as possible. Thus, my recommendation is to do the planning on an aggregated level wherever possible. The process chain functionality I describe here requires at least SAP SCM 4.0.

Andreas Gründobler

Andreas Gründobler is an IT analyst at OSRAM Opto Semiconductors GmbH Regensburg, Germany. After finishing his studies of information technologies at the University of Applied Sciences in Regensburg, he was project leader in charge of implementing several modules of SAP APO. He has five years of experience with SAP SCM planning purposes, especially demand planning, and is a certified SAP Solution Consultant in Planning & Manufacturing.

See more by this author


No comments have been submitted on this article. 

Please log in to post a comment.

To learn more about subscription access to premium content, click here.