Hi all,
It Reads Fiscal Period and fills the variable from 01 to Period -1.
If Period '01' is entered from the Selection screen then it shouldn't calculate.
If Period '02' is entered then it should calculate for Period '01' (Selected Period Minus 1).
Like, if Period '03' is entered then it should calculate from Period '01' to Period '02' (Selected Period Minus 1).
----
WHEN 'ZVCxxx01.
IF i_step = 2. "after the popup
LOOP AT i_t_var_range INTO loc_var_range
WHERE vnam = '0P_PER3'.
CLEAR l_s_range.
l_s_range-sign = 'I'.
IF loc_var_range-low = '002'.
l_s_range-opt = 'EQ'.
l_s_range-low = '001'.
ELSE.
l_s_range-opt = 'BT'.
l_s_range-low = '001'.
w_period = loc_var_range-low.
w_period = w_period - 1.
WRITE w_period TO l_s_range-high.
ENDIF.
APPEND l_s_range TO e_t_range.
EXIT.
ENDLOOP.
ENDIF.
Second Program:
It Reads Fiscal Period and fills the variable from selected Period to 012 (i.e end of the year)
If Period '001' is entered from the Selection screen then it should calculate from
001 to 0012.
If Period '02' is entered then it should calculate for Period '002' to '012'.
WHEN 'ZVCxxx02'.
IF i_step = 2. "after the popup
LOOP AT i_t_var_range INTO loc_var_range
WHERE vnam = '0P_PER3'.
CLEAR l_s_range.
l_s_range-sign = 'I'.
IF loc_var_range-low = '001'.
l_s_range-opt = 'EQ'.
l_s_range-low = '001'.
ELSE.
l_s_range-opt = 'BT'.
l_s_range-low = w_period.
w_period = loc_var_range-low.
w_period = 012.
WRITE w_period TO l_s_range-high.
ENDIF.
APPEND l_s_range TO e_t_range.
EXIT.
ENDLOOP. ">>
ENDIF.
Thanks in advance.
Regards,
Venkat.