Hi,
We have the requirement to use the two customer exits within the same query. The ABAP'er wrote the code for both at the same place in CMOD->ZXRSRU01->
Though the query variable is correctely passed, only one case(the first variable) is executing but not the second. For your reference I am copying the code here.
DATA: l_number_of_days TYPE i.
DATA: loc_var_range LIKE rrrangeexit.
DATA: L_S_RANGE TYPE RSR_S_RANGESID,
d1 type sy-datum,
d2 type sy-datum,
d3 type i.
CASE i_vnam. " Variablenname
when 'ZVAR_DAYSINMONTH'.
DATA: l_firstday LIKE SY-DATUM,
l_lastday LIKE SY-DATUM,
ws_year(4) type c,
ws_mth(2) type c.
clear : ws_year, ws_mth.
IF i_step = 2.
LOOP AT i_t_var_range INTO loc_var_range
WHERE vnam = '0I_DAYS'.
EXIT.
ENDLOOP.
ws_year = loc_var_range-low(4).
ws_mth = loc_var_range-low+4(2).
CONCATENATE ws_year ws_mth '01' INTO l_firstday.
CALL FUNCTION 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
EXPORTING
DAY_IN = l_firstday
IMPORTING
LAST_DAY_OF_MONTH = l_lastday.
l_number_of_days = l_lastday - l_firstday.
l_number_of_days = l_number_of_days + 1.
CLEAR l_s_range.
l_s_range-low = l_number_of_days .
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range to e_t_range.
ENDIF.
endcase.
CASE i_vnam. " Variablenname
when 'ZVAR_SDAYS'.
Read table i_t_var_range INTO loc_var_range With key vnam = '0I_DAYS'.
d3 = loc_var_range-high - loc_var_range-low.
d3 = d2 - d1.
l_s_range-low = d3 .
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range to e_t_range.
ENDCASE.
Thank you.