For a long time we used for checking and manipulation of customer exit variables the enhancement RSR00001. Since SAP BW 7.3 SAP offers the BAdI RSROA_VARIABLES_EXIT_BADI. Since BW/4 you only could use this BAdI and not anymore the enhancement RSR00001.
The BAdI RSROA_VARIABLES_EXIT_BADI is a filter based BAdI. As filter object is used the InfoObject which the variable is based on. Every implementation calls the interface IF_RSROA_VARIABLES_EXIT_BADI~PROCESS. So now let's create an example customer exit variable. The variable is based on Sales Channel (ZQV_ZSALCH_CEO_001) and can handle multiple single values.
After we created this variable we go to the transaction SE18 and open the enhancement spot RSROA_VARIABLES_EXIT.
- Frist we create a new BAdI Implementation
- Then we create a new Enhancement Implementation
- Select the Enhancement Implementation
So after we select our Enhancement Implementation we can create our BAdI Implementation and Implementation Class.
Now we can implement our own coding for this implementation class and define the filter for the Enhancement Implementation.
This is the normal implementation way. But now we implement an own enhancement spot to encapsulate our developments. Therefore we go to the se18 and implement the enhancement spot ZES_VARIABLE_EXISTS.
After we created our Enhancement Spot we now have to implement a BAdI definition and add the Interface IF_RSROA_VARIABLES_EXIT_BADI to our BAdI.
Now we add a filter to our BAdI.
Now we can implement as above mentioned our enhancement implementation and BAdI for the variable exist. The only thing we have to change is the filter because we now based it on the variable name instead of the InfoObject.
So now we have one enhancement spot with several enhancement implementations (for each variable) with several BAdIs and Classes to separate each implementation with the variable name. The advantage of this is in a large project if one customer exit variable doesn't work it only affect this variable and not the whole system.
I hope this makes it a little bit easier to understand. Now what's only missing is the call from RSROA_VARIABLES_EXIT to our own enhancement spot ZES_VARIABLE_EXISTS. Therefore we have to add an implementation to RSROA_VARIABLES_EXIT to call our enhancement spot. We add a new implementation with the following coding:
DATA: lo_var_badi TYPE REF TO ZBI_VARIABLE_EXITS.
DATA: lt_range_tmp TYPE rsr_t_rangesid.
GET BADI lo_var_badi FILTERS varnm = i_vnam.
IF LINES( lo_var_badi->imps ) <> 0.
CALL BADI lo_var_badi->process
i_vnam = i_vnam
i_vartyp = i_vartyp
i_iobjnm = i_iobjnm
i_s_cob_pro = i_s_cob_pro
i_s_rkb1d = i_s_rkb1d
i_periv = i_periv
i_t_var_range = i_t_var_range
i_step = i_step
c_t_range = c_t_range
c_no_screen = c_no_screen
c_check_again = c_check_again
c_s_customer = c_s_customer.
So the SAP standard enhancement spot only points to our enhancement spot and we are completely independent from other developments.
Analysis Office Video Course
You want to know SAP Analysis Office in a perfect detail?
You want to know how to build an Excel Dashboard with your Query in Analysis Office?
You want to know how functions in SAP Analysis Office works?
Then you have to take a look into Analysis Office - The Comprehensive Guide. Either as a video course or as a ebook.