Making Use of customer exit Variables in BI

...Previous

method Z_IF_REPORT_VARIABLE~EXECUTE.

 
CONSTANTS: c_zvbicalM  TYPE char8 VALUE 'ZVBICALM',
            c_zvbicall  
TYPE char8 VALUE 'ZVBICALL',
            cn3       
TYPE tfmatage VALUE -3,
            c_sign_i 
Type char1 value 'I',
            c_range_opt_bt 
type char2 value 'BT'.

DATA: l_year         TYPE n LENGTH 4"Holds Year
      l_month        
TYPE n LENGTH 2"Holds month
      l_s_range      
TYPE rsr_s_rangesid, "Range Table of type E_T_RANGE
      l_date      
TYPE sy-datum,          "Holds the date
      wa_t_range 
type RRRANGEEXIT.

 
IF I_STEP = 2.
    
CASE i_vnam.
    
WHEN c_zvbicall.

READ TABLE I_T_VAR_RANGE WITH KEY VNAM = c_zvbicalm TRANSPORTING NO FIELDS.

     
if sy-subrc NE 0.
        
CLEAR   l_s_range.

        l_year  = sy-datum(
4).
        l_month = sy-datum+
4(2).
* this fm is going to give back the previous3thmonth

        
CALL FUNCTION 'FIMA_END_OF_PERIOD_DETERMINE'
          
EXPORTING
            i_date               = sy-datum
            i_months             = cn3
          
IMPORTING
            e_date_end_of_period = l_date.

        
CONCATENATE  l_date(4) l_date+4(2)   INTO   l_s_range-low.
        
CONCATENATE  l_year    l_month       INTO   l_s_range-high.
           l_s_range-
sign       = c_sign_i.
           l_s_range-opt        = c_range_opt_bt.
*         l_s_var_range-VNAM       = c_zvbicalm.
*         l_s_var_range-IOBJNM     = c_z_tec0_m.
          
APPEND l_s_range TO e_t_range.
   
endif.
    
endcase.
endif.
 
endmethod.

There is no need to create ZVBICALM class. This is just a dummy variable for display purpose.

Executing the Query

Click on execute button

Here (*) implies mandatory fields, give values for those.

As u can see there are no values given for Variable Month/year

This is the output we get for these selection criteria.

Click on Info tab to get our selection criteria values.

The period value for TECO Month has come from variable ZVBICALL (customer exit variable) as you can see below even though Month/Year variable is empty.

 ZVBICALL-low = 11.2010((current month- 3months) and ZVBICALL-high = 02.2011(current month)

 

Here I try to give the values same as we get from our exit variable to check if we get same output in both cases.

Since we input the values for Month/Year in selection screen we get value directly into TECO month from Month/Year variable. Check selection criteria values in Info tab

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