Recently I had to write a custom planning function for a customer as part of a project. First I read through the help.sap.com pages and found a The specified item was not found.from Marc Bernard how you can upload a flatfile into BI-IP using a custom planning function.
Nevertheless it was a bit crucial until I had found out which parameters in RSPLF1 had to be set and which methods of the interface classes had to be implemented. So I decided to set up an how-to document that should help you to avoid the basic obstacles and to give you a step-by-step guide how you can write your custom planning function using RSPLF1, how to test it in your planning application and transport it to your QA/PROD system. To make it easy I copied the existing copy planning function into customer namespace and changed the code where necessary.
You can find the arcticle in SDN here for download.
As a short summary the main steps to create your custom planning function:
- Create appropriate aggregation level
- Create a custom ABAP/OO class
- Create custom function in RSPLF1
- Integrate custom function in your planning application
- Create a planning sequence
- Execute planning sequence
- Change code in planning function
- Debug and Test
My lessons-learned as I created a planning function for the first time ever:
– Choose the right parameter configuration and data types for your function
If you choose the wrong combination of paramter settings your planning function won’t behave as expected and you may have to implement a diffferent interface. tHe most important thing is to consider if you need blocking and reference data. If you’ve done this decision you can implement the right methods. It’s the same with the data types. Dependent on the data type, the user interface for parameter input will change.
– The user interface for the copy function can be set up in a webdynpro
My copy function really looks very basic and is not very userfriendly. If you want to create userfriendly interface, you have to create addtional webdynpro which allow to fill the parameters with values, display value help and many more.
Setting up a user interface using webdynpro will be part of one of my next articles, so stay tuned.