cancel
Showing results for 
Search instead for 
Did you mean: 

Customer exit varailble creation on 0FISCPERIOD to get Rolling 12 months

Former Member
0 Kudos

Hi Experts,

I need help with BW Customer Exit code. This is my requirement. We need to fetch last 12 months data by designing a filter on 0FISCPER, the code should go back 12 months back from there and apply that period as the lowest range and the current period as
the highest value range. Can anyone help??

EX: Rolling 12 months data has to be displayed

When user checks the data today (09/2015) he should be able to see the data back to 12 months
data(09/2014) as well.

Thanks in Advance,

Srinivas.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member194898
Active Contributor
0 Kudos

Hi,

Use range of values.

Starting point can be counted (code below) from what was choosen by user in ending point.

Regards, Leszek

WHEN 'ZFISCPERPREVYEAR'.

     IF i_step = 2.
       LOOP AT i_t_var_range INTO l_s_var_range
         WHERE vnam = 'ZFISCPER'.
         EXIT.
       ENDLOOP.
       CLEAR: l_s_range.
       YEAR = l_s_var_range-low(4).

       PERIOD = L_S_RANGE-LOW+4(2).


       YEAR = YEAR - 1.
       CONCATENATE  YEAR PERIOD INTO l_s_range-low.
       l_s_range-sign = 'I'. "loc_var_range-sign.
       l_s_range-opt = 'EQ'. "loc_var_range-opt.
       APPEND l_s_range TO e_t_range.

     ENDIF.