
Overview
Based on my experience, many BW developers use transformation and many of them implement ABAP in several places: Start Routine, End Routine, Field calculation etc. So these options are widely used and known.
During my trainings I receive questions from developers where we come to the conclusion that many people miss the opportunities and the power of the Rule Groups. I agree, this function hides behind a dropdown list and we can easily miss it. In this post I want to highlight the functionality behind the hiding Rule Groups dropdown list.
"I want to generate from 1 row several rows...maybe with ABAP ?"
My attendees ask such or similar questions and my answer is - maybe yes, maybe no, it depends. While I answer this, I always think of the context of the Rule Groups and analyze if this context fits into the question.
Let me show you the situation where Rule Group can be very helpful.
You might have the following requirement and source structure coming from the source system like a Sales Plan table.
Source Structure: Quarterly Sales Plannig by Stores
Store |
Year |
SalesQ1 |
SalesQ2 |
SalesQ3 |
SalesQ4 |
ST01 |
2015 |
12500 |
15000 |
14000 |
11000 |
ST02 |
2015 |
13000 |
14000 |
17000 |
18000 |
ST03 |
2015 |
22000 |
23500 |
21400 |
26200 |
And you need to convert this table to the following format. So you need to generate from each source line always 4 lines in the infocube and you want to store the different key figures in a single Sales Amount key figure.
Target Structure: Plan Infocube
Store |
Year |
Year Quarter |
Sales Amount |
ST01 |
2015 |
20151 |
12500 |
ST01 |
2015 |
20152 |
15000 |
ST01 |
2015 |
20153 |
14000 |
ST01 |
2015 |
20154 |
11000 |
... |
... |
... |
... |
Answer: Rule Groups in Transformation
If you face a problem shown above, then Rule Groups are the tool you need.
How to apply Rule Groups ? Check my video about that!
Conclusion
Understanding the context of the Rule Groups and using them consiously, reduces the need of writing ABAP in complex situations.