In this article, I am going to talk about, how to load the demand data to 9ADEMAND info cube and how to debug the errors/warnings that occur during forecast run. I am assuming that the reader has basic knowledge about SAP SCM Service parts planning (SPP) and SAP BI, also done the BI content activation required for forecast.
When I started to work on service parts planning, I did search the SAP help and SDN for information about mapping between 9ADEMAND and the file upload data source 9ASPP_CD_CSV_LOAD. The standard data source 9ASPP_CD_CSV_LOAD seems to read data from desktop files. But this does not really suit the requirements, so you can copy this data source and create a new one to read the data from files located on application server. Once we have the data source that suits our requirement, the next challenge is to map the data source fields to infocube. Believe me there are lot of queries in the internet about this but not many convincing answers. I believe that most of the folks who are new to SPP struggle to figure out the mapping and load the demand data and I was one of them. This blog is an attempt to relieve that struggle a bit.
Here is what your mapping should look like if the periodicity is set for Month. You can check the periodicity setting in the configuration mentioned below:
SPRO –> Advance Planning and Optimization -> Supply Chain Planning -> Service Parts Planning -> Basic Settings -> Determine Forecast Periodicity
|Data Source||InfoCube Fields|
|This does not have corresponding field in standard data source, so you can add it to your custom DS or hard code it in the transformation.||9ADEM_CAT ( demand category)Please note this field is required for forecast to run successfully. Refer to the below SAP help|
|This does not have corresponding field in standard data source, so you can add it to your custom DS||0CALMONTH|
When we ran the interactive forecast for certain product, we always ended up seeing blank screens (or) warning message like below:
Product/location &1/&2&3: No historical time series to determine message no /SAPAPO/PFCS_MESS204
Like an innocent abap developer I went to SE91 and tried to do where used list for the particular message, hoping that I will get the program from where, the error is coming from. Unfortunately the error/warning messages are generated a bit differently in the program (using method add_bal_log_message. Message ID and message numbers are declared as constants in public section of the exception class /SAPAPO/CX_FORECASTING). This way of displaying message will prevent the where used list approach to zero in on programs. Now you guys may be thinking how I found the solution to this. Here is how I managed to figure it out.
One fine day, I was searching for SAP notes related to this message. I found one which talks about this message and in correction instruction there was a mention of class /SAPAPO/CL_PE_FCS_SERVICE. That was my first clue. I went to the class and used “find” button to find out the message 204. Bingo… Fortunately SAP has written this message class (SAPAPO/PFCS_MESS) and no (204) in comments. So I got some methods where this message is thrown.
From there a long journey of debugging started off. All configurations that we did for forecast/demand history capture are coming to life before my eyes. That was great experience!
One important thing that I noticed while debugging is, how the system reads the data from the infocube. The selection criteria that it uses is this:
|9ADEM_CAT_9AFCSTABLE||I||EQ||X ( this value is determined by the system, by looking into the table /SAPAPO/PDEMPRED for a given demand category. If the demand category is forecast relevant, then the value is taken as ‘X’)|
|9ASTOCKING||I||EQ||Stockholding location. Taken from the bill of distribution(BOD)|
|0CALMONTH||I||BT ( between)||If you enter 12 as “historical periods” in general tab of the forecast profile, then the value will be
Low – 201010
High – 201110”
This will give us what exactly system used to read the demand data and help us in identifying the required mappings. The function module used to read the infocube data is /SAPAPO/TDL_IC_READ.
I hope the information I provided here will help functional/technical consultants who are working in SAP SCM SPP.