hi,
on the query designer i have a variable where the user fills in the year N, and In the query i need to calculate a profit of a year N-1 according to a year N entered by the user.
here is my code abap in exit function where CA_N_1 is my variable BEX customer exit, and YEARN_1 is the variable bex that takes the year entered by a user :
DATA: LS_T_VAR_RANGE like rrrangeexit,
LV_CALYEAR type T009B-BDATJ,
LV_FISCYEAR type T009B-BDATJ.
WHEN 'CA_N_1'.
IF i_step = 2.
READ TABLE i_t_var_range INTO LS_T_VAR_RANGE
WITH KEY vnam = 'YEARN_1'.
LV_CALYEAR = LS_T_VAR_RANGE-low.
LV_CALYEAR = LV_CALYEAR - 1.
l_s_range-low = LV_CALYEAR .
l_s_range-opt = 'EQ'.
l_s_range-sign = 'I'.
APPEND l_s_range TO e_t_range.
ENDIF.
a copy of how i defined my variables and my ratio profit_N-1 is attached, when I compile the code with in input 2013 for example I can see that my variable Yearn-1 takes 2012 at the end, but in the query my ratio ^ profit_N-1 doesn't bring anything.
Please help me i can't find where is the problem...
Thank you for your help.