Customer exits are possibilities provided by SAP to customize and enhance standard functionality to address business requirements. Until the release of SAP BW 7.3, customer exit function for variables were programmable in transaction code CMOD (Customer Exit) under function module EXIT_SAPLRRS0_001(Exit RSR00001).
Enhancement spot – “RSROA_VARIABLE_EXIT” was introduced in SAP BW 7.4. This BADI method provided an additional option to enhance standard functionality along with EXIT_SAPLRRS0_001.
With the introduction of SAP BW4/HANA, Enhancement spot is the only option because EXIT_SAPLRRS0_001 is no longer supported. All existing CMOD exits must be converted to Enhancements spots before migrating to BW4/HANA.
This blog focusses on how to convert the obsolete customer exits (CMOD) to enhancement spots. The recommended approach is to use the enhancement spots and group customer exists based on the application area. This ensures easier maintainability.
Step 1: Create a function module in SE37 like the CMOD function module EXIT_SAPLRRS0_001
Make sure that you copy the import parameter, export parameter and changing parameter as in EXIT_SAPLRRS0_001. Your function module should look like.
1. Import Parameter
2. Export Parameters
3. Changing Parameters
STEP 2: In the source code tab, write INCLUDE <include name>. This program will contain the contents copied from EXIT_SAPLRRS0_001
Save your function module and double click the include name. The below shown pop-up box will appear and click “Yes”.
STEP 3: Copy the code present in the include of FM EXIT_SAPLRRS0_001 into your new include and activate it along with your Function module
STEP 4: Now go to transaction SE18 and select enhancement spot RSROA_VARIABLES_EXIT
Right click on implementation and select “Create BAdI Implementation”
You will be shown a popup with two predefined enhancement implementations. Go ahead and create a new enhancement implementation for your CMOD.
STEP 5: Now create a BADI implementation
Select the Implementation class and double click on the method IF_RSROA_VARIABLES_EXIT_BADI~PROCESS to create it. Choose “Yes” in the popup that appears.
STEP 6: Click on “Pattern” and enter the function module we had created earlier in the CALL FUNCTION box.
Adjust the import and export parameter such that it looks like the screenshot below.
Activate the method and relevant BADI and enhancement implementation.
After migration, CMOD exits present in your function module will be called through the BADI.
Know more about Visual BI Solutions SAP BW Services offerings here.