Skip to Content
avatar image
Former Member

Customer Exit for Rolling Back 91 days from User Entered Date (Key Date)

Hi Experts,

I need help with BW Customer Exit code. This is my requirement. We need to fetch last 91 Days of data by creating a variable on 0calday, the code should go back 91 days from the user entered date.

EX: Rolling 91 Days of data has to be displayed

When user checks the data today (17/05/2017) he should be able to see the data back to 91 Days which is from (16/02/2017).

Sample Code :

case i_vnam.


IF I_STEP = 2.

READ TABLE i_t_var_range into loc_var_range WITH KEY vnam = '0P_KEYDT'. l_s_range-low = sy-datum - 91.

l_s_range-sign = 'I'.

l_s_range-opt = 'eq'.

APPEND l_s_range to e_t_range.



Thanks in Advance,


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 17, 2017 at 12:36 PM


    check out doc

    there are a lot of posts explaining how to do this.

    I_step = 1,2 or 3 depending on what you want setting default (1) values, no userinput after prompt (2)

    your code should set a opt='BT' (between, because you need a range)

    for your range to be correct, fill out low (date-91) and high (current date=sy-date).



    Add comment
    10|10000 characters needed characters exceeded