In the below blog you will be able to understand IBP_CALENDAR function in details. After reading this, you shall be able to do pre-configuration and use calendar function in a key figure. In addition to that, you shall be able to understand its prerequisites and used cases.
- Reader understands and know the basics of configuration like Attribute, Master Data, Planning Level, Key figure, planning area etc.
- Reader understands on how to write the key figure calculations
- Reader should be well versed with IBP Excel Add and it’s use
2. What is IBP_CALENDAR( ) :
It is a key figure function, which can be used to calculate the number of working and non-working days by taking planning calendar as input.
Below is how the function look like:
IBP_CALENDAR (<KEY FIGURE@PLANLEVEL, <CALENDAR ATTRIBUTE>)
The first parameter should be a stored key figure, which has data available in the time-periods that are in focus and which meets the criteria of input and output planning level as per the base planning level
The second parameter is a Calendar Attribute that we have to create and assign to a master data type, planning area and planning level before using it in the key function calculations.
- A planning calendar already exists which can be created either manually or can be integrated from the S/4 HANA or ECC.
Available planning calendars can be seen in the below app “Planning Calendars”
While calculating the workday’s system uses the calendar id as highlighted in the above screenshots. In our example, we will use Germany (Standard) calendar, which has a planning id as “01”
4. The configuration:
4.1 Create a new Calendar attribute in the Attribute app
I have created “ZCALID” as calendar attribute in the below example
4.2 Assign the attribute to the location master data type using the “Master Data Types” app
4.3 Assign the attribute to the planning area and desired planning levels
In the below screenshot it can be seen that I have assigned this attribute to all the planning levels that are on day level and location master data available in their planning levels
4.4 Create key figure to calculate workdays as per below screenshot which uses IBP_CALENDAR() as function
Note: I have used “ZACTUALQTY@DAYPRODLOCCUST” as input; any stored key figure can be used that meets the planning level requirement. Also, ensure the key figure being used must have data available in the periods in focus in order to avoid missing time-period related issues.
4.5 Activate the planning area
4.6 Login to the IBP Excel UI and open master data type “Location”
In the attribute “ZCALID”, provide the calendar ID that is relevant for the location being used and save the data
Note: It is the same id, which is there in the “Planning Calendars” app. I am using ‘01’ i.e. Germany (Standard)
We are done with the configuration required now we can load the key figure “Working Days” in the planning view to see the results.
5. Viewing the results
In the below screenshot number 1 denotes workday while 0 donates a non-working day. Kindly note this should be in alignment to the planning calendar of Germany as we used ‘01’ as ID.
6. Used Cases:
6.1 As an independent variable while using gradient boosting algorithm : The key figure “Working Days” can be given as an independent variable directly into the algorithm
6.2 It can directly be multiplied with another key figure to zero out the data in the non-working days as shown below.
Consideration of Calendars is one of the most important requirements from the customers. In addition to this function we can also utilize planning calendar as a direct input into the algorithm with the help of master data types where we can define the transportation, production, receiving calendar etc. Let me know if you want me to write more on calendars capability of SAP IBP.
Also, please let me know if you found this blog as helpful in the comment section as it will encourage me to keep making more content. For sure you can share your thoughts, experience to initiate interesting conversation that enhance the knowledge of the community.