Quantcast
Channel: SCN : All Content - SAP Business Explorer (SAP BEx)
Viewing all articles
Browse latest Browse all 3763

Implementing Framework for Customer Exit OLAP Variables

$
0
0

Customer Exit OLAP Variables require ABAP coding which often can be found in a single INCLUDE program ZXRSRU01 as part of legacy Enhancement RSR00001 (a.k.a. Customer Exit EXIT_SAPLRRS0_001). Usually the INCLUDE program becomes bigger and bigger. Moreover, various people and/or project teams are working in the same place. You can imagine that it is dangerous because one programming or transport sequence mistake can destabilize the entire system. The solution is encapsulation of the coding of individual variables and you will need a framework to realize it.

I would like to share via this document detailed technical instructions how to implement such a framework. Please refer to my blog Framework for Customer Exit OLAP Variables for an introduction of the framework and additional information.

Step 1: Create Enhancement Spot

SAP Menu: Tools > ABAP Workbench > Utilities > Business Add-Ins > Definition

T/code: SE18

 

Create Enhancement Spot YBW_OLAP_VAR as shown in the screenshots.

 

Figure_01_Creating_Enhancement_Spot.jpg

Figure 1: Creating an Enhancement Spot

 

On the overview screen of the Enhancement Spot you are able to create one or more BAdI Definitions. You have to create the following 4 BAdI Definitions:

  • YBW_OLAP_VAR_BEFORE_POPUP - OLAP Customer Exit Variables - Before Popup (i_step = 1);
  • YBW_OLAP_VAR_AFTER_POPUP - OLAP Customer Exit Variables - After Popup (i_step = 2);
  • YBW_OLAP_VAR_VALIDATION - OLAP Customer Exit Variables - Validation (i_step = 3);
  • YBW_OLAP_VAR_AUTHORIZATION - OLAP Customer Exit Variables - Authorization (i_step = 0).

 

Figure_02_Example_Creating_BAdI_Definition.jpg

Figure 2: Example of creating a BAdI Definition

 

Figure_03_Overview_All_BAdI_Definitions.jpg

Figure 3: Overview of all BAdI Definitions

 

The settings of all BAdI Definitions are basically the same and will be explained by showing the screenshots for BAdI Definition YBW_OLAP_VAR_BEFORE_POPUP.

 

Figure_04_Example_BAdI_Definition_General_Settings.jpg

Figure 4: Example of BAdI Definition - general settings

 

Interface IF_RSROA_VARIABLES_EXIT_BADI is reused from standard SAP BAdI RSROA_VARIABLES_EXIT_BADI as part of Enhancement Spot RSROA_VARIABLES_EXIT.

 

Figure_05_Example_BAdI_Definition_Interface.jpg

Figure 5: Example of BAdI Definition - Interface

 

With the Filter only BAdI Definition YBW_OLAP_VAR_VALIDATION has an exception. Processing step 3 (i.e. i_step = 3) is only called once (i.e. not variable dependent). The suggested approach is to define a filter on Query.

 

Figure_06_Example_BAdI_Definition_Filter_1.jpg

Figure 6: Example of BAdI Definition – Filter (1)

 

Figure_07_Example_BAdI_Definition_Filter_2.jpg

Figure 7: Example of BAdI Definition – Filter (2)

 

Figure_08_Example_BAdI_Definition_Filter_3.jpg

Figure 8: Example of BAdI Definition – Filter (3)

Step 2: Implement Standard SAP Enhancement Spot

SAP Menu: Tools > ABAP Workbench > Utilities > Business Add-Ins > Implementation

T/code: SE19

 

Implement standard SAP Enhancement Spot RSROA_VARIABLES_EXIT as shown in the screenshots.

 

Figure_09_Creating_Enhancement_Implementation_1.jpg

Figure 9: Creating an Enhancement Implementation (1)

 

Figure_10_Creating_Enhancement_Implementation_2.jpg

Figure 10: Creating an Enhancement Implementation (2)

 

Figure_11_Creating_Enhancement_Implementation_3.jpg

Figure 11: Creating an Enhancement Implementation (3)

 

Figure_12_Enhancement_Implementation_General_Settings.jpg

Figure 12: Enhancement Implementation - general settings

 

Figure_13_Enhancement_Implementation_Implementing_Class.jpg

Figure 13: Enhancement Implementation - Implementing Class

 

Don’t forget to implement method IF_RSROA_VARIABLES_EXIT_BADI~PROCESS. Entering a comment will do for this moment.

 

Note that you don’t have to create a new filter. The Enhancement Spot Implementation always has to be processed.

Step 3: Maintain Class

SAP Menu: Tools > ABAP Workbench > Development > Class Builder

T/code: SE24

 

In Step 2 as part of the Enhancement Spot Implementation, Implementing Class YCL_RSROA_VARIABLES_EXIT was created without actual coding. You now have to maintain the class to provide the coding.

Refer to the attached file YCL_RSROA_VARIABLES_EXIT_v1.txt. From here you can quite easily copy & paste the source code.

Step 4: Implement Enhancement Spot

SAP Menu: Tools > ABAP Workbench > Utilities > Business Add-Ins > Implementation

T/code: SE19

 

This is a recurring action for every new Customer Exit Variable. You have to choose an appropriate BAdI which corresponds to the purpose.

Implement Enhancement Spot YBW_OLAP_VAR as shown in the screenshots.

 

Figure_14_Creating_Enhancement_Implementation_1.jpg

Figure 14: Creating an Enhancement Implementation (1)

 

Figure_15_Creating_Enhancement_Implementation_2.jpg

Figure 15: Creating an Enhancement Implementation (2)

 

Figure_16_Creating_Enhancement_Implementation_3.jpg

Figure 16: Creating an Enhancement Implementation (3)

 

Figure_17_Enhancement_Implementation_General_Settings.jpg

Figure 17: Enhancement Implementation - general settings

 

Figure_18_Enhancement_Implementation_Implementing_Class.jpg

Figure 18: Enhancement Implementation - Implementing Class

 

Figure_19_Enhancement_Implementation_Filter.jpg

Figure 19: Enhancement Implementation - Filter

 

Refer to the attached file YCL_0FISCPER_C_C_I_0000_v1.txt for an example of the coding in a random implementation.


Viewing all articles
Browse latest Browse all 3763

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>