Skip to Content
0

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

May 17, 2017 at 05:39 AM

73

avatar image
Former Member

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.

when 'YCALDAY_CEXIT1'.

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.

ENDIF.

ENDCASE.

Thanks in Advance,

Navalan.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Koen Hesters May 17, 2017 at 12:36 PM
0

Hi,

check out doc

https://wiki.scn.sap.com/wiki/display/BI/Customer+Exit+Variables+in+SAP+BI

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).

Goodluck!

Koen

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Koen Hesters, Good Day to U ,i appreciate ur valuable support

0