· 

BW/4HANA 2.0 Customer Exit Variables with own enhancement spot

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.

Customer Exit Variable
Customer Exit Variable

After we created this variable we go to the transaction SE18 and open the enhancement spot RSROA_VARIABLES_EXIT.

Create new enhancement implementation
Create new enhancement implementation
  1. Frist we create a new BAdI Implementation
  2. Then we create a new Enhancement Implementation
  3. Select the Enhancement Implementation
Create new BAdI implementation
Create new BAdI implementation

So after we select our Enhancement Implementation we can create our BAdI Implementation and Implementation Class.

Enhancement Implementation with Implementation Class
Enhancement Implementation with Implementation Class

Now we can implement our own coding for this implementation class and define the filter for the Enhancement Implementation.

Enhancement Implementation with Filter Value
Enhancement Implementation with Filter Value

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.

Create own Enhancement Spot
Create own Enhancement Spot

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.

Add Interface to BAdI
Add Interface to BAdI

Now we add a filter to our BAdI.

Create filter for enhancement implementation
Create filter for enhancement implementation

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.

Create Filter based on variable
Create Filter based on variable

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.

Example for own enhancement spot
Example for own enhancement spot

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

EXPORTING

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

CHANGING

c_t_range         = c_t_range

c_no_screen     = c_no_screen

c_check_again = c_check_again

c_s_customer   = c_s_customer.

ENDIF.

RSROA_VARIABLES_EXIT with Mapping
RSROA_VARIABLES_EXIT with Mapping

So the SAP standard enhancement spot only points to our enhancement spot and we are completely independent from other developments.

author.


I am Tobias, I write this blog since 2014, you can find me on twitter and youtube. If you want you can leave me a paypal coffee donation. You can also contact me directly if you want.

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.


Analysis Office - The Comprehensive Guide 5th edit
The book SAP Analysis Office - The Comprehensive Guide by Tobias Meyer is a pdf book about SAP Analysis for Office. It is based on Analysis for Office 2.8 and contains 346 Pages.
57,00 €
Analysis Office - The Comprehensive Guide 4th edit
Analysis Office - The Comprehensive Guide is a pdf book about SAP BusinessObjects Analysis Office. It is based on Analysis Office 2.7 and contains 299 Pages.
37,00 €

Write a comment

Comments: 0