Forecasting is a process by which system reads the historical values and based on forecasting algorithm used, proposes future values. SAP APO Demand Planning (DP) provides multiple forecasting techniques/models which could be used by business as per their requirements. Results of forecast can be seen in the planning book and same can be adjusted/corrected as needed.
Forecasting is generally based on historical data. An exception could be the scenario where the product does not contain any history values (could be because product is newly launched – In such cases forecast could be based on actual data of a similar product – Can Be achieved by like profile). Historical values on which forecast are based can be coming from multiple sources like Legacy system, File system, other interfaces etc. into SAP Demand Planning. These values are initially loaded into an Info cube and from there it’s further processed.
In this document, we will not discuss how data is loaded to APO in detail. Below diagram gives a high level overview of the process of loading data from source system to Info cube in APO –
Loading of data in Info cube in SAP APO could involve the following steps at broad level –
1) Create the Target that is the Info Cube by defining the Info Objects (Characteristics and Key Figures).
2) The Data is correctly formatted, and is then uploaded in the Data Source (DS) or Persistence Storage Area (PSA) by executing the Info Package.
3) Create Transformation by mapping the fields of the Data Source to the fields in the Info Cube. Data Source fields are mapped to the Info Objects.
4) Run the Data Transfer Process (DTP) to load the data from the data source to the info cube.
Data format loaded in Info cube for our example –
Once the data is loaded to Info cube, we could see the same in APO DP.
Transaction – LISTCUBE
Before we could carry out forecast on these historical values, one needs to carry out following steps.
1. Create CVCs (Characteristic Value Combinations) for Planning Area
2. Time Series Initialization for Planning Area
3. Load data from Info cube to Planning Area
4. Carry Out Forecasting Based on Forecast Model and Generate the Forecast for Future Time Periods
We would see each of the steps and how to automate these via a process chain –
Step 1 – Create CVCs in Demand planning
Transaction – /SAPAPO/MC62
As highlighted above, we can save the selection in a variant – This would be subsequently used while running this step via process chain.
Step 2 – Time Series Initialization for Planning Area
Next we need to create time series for the planning area which is linked to the MPOS. This could be done both via Program and from Planning Area too.
Transaction – /SAPAPO/MSDP_ADMIN
Here we select the planning area – Rt. Click and select time series objects and give the horizon as shown below –
Program – /SAPAPO/TS_PAREA_INITIALIZE
Here also we will get similar screen – we need to provide name of the planning area, version along with the time horizon. We can save the selection in a variant in order to use this via process chain.
Step 3 – Load Data from Info cube to Planning Area
This step is used to load the history from info cube to planning area on the basis of which forecast will be calculated
Transaction – /SAPAPO/TSCUBE
Program – /SAPAPO/RTSINPUT_CUBE
On key figure assignment tab – Add the name of historical figure in source cube on left side and in right side add the name of key figure in target planning area for which history will be copied for specified period
Step 4 – Execute Forecasting Model and Generate the Forecast for Future Time Periods
Transaction – /SAPAPO/MC96B
Initially one needs to create a master forecast profile which is assigned to the planning area. Major Fields in Master Forecast profile are –
- Period Indicator – Defines the time buckets profile for the forecast
- Forecast Horizon – Time period for which one want to create the forecast
- History Horizon – Horizon of the past period, the actual data of which is to be used to create the forecast
- Statistical forecast profiles – Here we assign the Univariate /MLR/Composite Profile to the Master profile depending on the forecasting model which is being used.
Univariate models are often called time series models. They develop forecast by analyzing the past trend and seasonality in historical values.
In Forecast strategy, SAP lists of multiple standard forecasting techniques which could be used as per requirement. Also smoothing factors are provided in terms of alpha, beta and gamma. The system uses the alpha factor to smooth the basic value, beta to smooth the trend value, and gamma to smooth the seasonal value. Once these values has been provided then save the profile.
Before creation of process chain to automate these four steps, we need to create activity and job to assign the forecast profile which in turn would be used in process chain –
Step 4A Create Activity for Forecast Profile
Transaction – /SAPAPO/MC8T
Save the required parameters as highlighted below and save the activity
Step 4B Create Job for Forecast Profile and Assign Activity
Transaction – /SAPAPO/MC8D
Save the required parameters as highlighted below and save the job
Creation of Process Chain to automate the above mentioned process
Transaction – RSPC
Go to change mode and create new and add name of process chain with start variant name. Then click on process type as shown below –
Then from the left side we select “Create Characteristic Combination” which is the step 1 as explained above and connect it to the first step as shown below –
Then again from left side we select “Initialize Create Time Series Objects” as shown below and attach it to the process chain which is the step 2 as explained above
Next we select load data from Info cube. This step is used to load the history from info cube to planning area which is the same as step 3 as explained above
From the process types drills down under “SCM – Demand Planning” select “DP Background Processing” as shown below. This step is similar to the step 4 explained above and uses Job and activity which were created for the forecast profile.
Then link the created step to the previous last step and this completes the entire process chain creation.
Finally we need to schedule and activate the created process chain. For scheduling we need to select the first start variant – Rt. click and then give the scheduling option – It could be run Immediately also or at specific date and time too depending on requirement.
On successful completion of the process chain, we could see the forecasted vales in the corresponding planning book/data view which was assigned in the forecast profile job.