Making Use of customer exit Variables in BI

By Venkat Suman B, IBM India

Scenario: The selection screen variable Month/year should be optional and if user inputs any value the Query should run for that selection condition else if user doesn’t input any values it should pick the dates as high = (current calmonth)  and low = (current calmonth – 3 months)

Solution: create two customer exit variables one having properties not ready for input & other as ready for input. The code is written for I_STEP = 2 for not ready for input variable but calling other variable in this code.

Let’s Consider a TEST Query.

Changes to be done in Query designer

Open the query in query designer

ZVBICALL is a customer exit variable with not ready for input.

ZVBICALM  is a customer exit variable with ready for input.

Save the changes.

Creation of Customer exit variables & ABAP devlopment

Go to Tcode CMOD in BI system and specify the Project name

It should consist of following enhancements

In the Components tab goto exit EXIT_SAPLRRS0_001 and INCLUDE ZXRSRU01.code should be written in this Custom Include only.

Code in Include ZXRSRU01

TRY.

    
DATA : l_name TYPE seoclsname.

    
IF i_step <> 3 .
      l_name = i_vnam.
    
ELSE.
      l_name = i_s_rkb1d-compid.
    
ENDIF.

    
CALL METHOD (l_name)=>Z_IF_REPORT_VARIABLE~execute
      
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
      
IMPORTING
        e_t_range     = e_t_range
        e_meeht       = e_meeht
        e_mefac       = e_mefac
        e_waers       = e_waers
        e_whfac       = e_whfac
      
CHANGING
        c_s_customer  = c_s_customer
      
EXCEPTIONS
        again         = 
1
        
OTHERS        = 2.

    
IF sy-subrc = 1 .
      
RAISE again .
    
ENDIF.
  
CATCH cx_sy_dyn_call_error .
ENDTRY.  

Here Z_IF_REPORT_VARIABLE is an Interface which has got a method Execute

During the runtime we get variable name into l_name & step value in i_step.

So we should be creating a class same as Variable name i.e value we get in l_name.

This is the declaration of Interface Z_IF_REPORT_VARIABLE in se24 Transaction

Create class ZVBICALL in Tcode SE24

Create class ZVBICALL giving the interface name in interface tab

Automatically the method is created, now click on CODE icon to write the code.

Click here to continue...

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image