Skip to Content
Former Member
Aug 03, 2011 at 07:13 PM

HELP - CUstomer Exit - Get YYYYMM from Variable ZKEYDATE (YYYYMMDD)


HI Gurus,

I created a exit variable 'ZKEYDATE2' in 0calmonth (YYYYMM) derive from variable 'ZKEYDATE1' based on Actual GI Date.

This is what I need for ZKEYDATE2

Low Value = ZKEYDATE1 YYYY+01 (input year, and January)

High Value = ZEYDATE1 YYYYMM (input year and the month)

This is what I have so far and I'm stuck....Please help



*& Form execute_user_exit


form execute_user_exit

tables i_t_var_range type rrs0_t_var_range

e_t_range type rsr_t_rangesid.

data: l_s_range type rsr_s_rangesid,

loc_var_range like rrrangeexit.

read table i_t_var_range into loc_var_range with key vnam = 'ZKEYDATE'.

if sy-subrc = 0.

clear l_s_range.

i_date = loc_var_range-low.

l_s_range-low =

l_s_range-high =

l_s_range-sign = 'I'.

l_s_range-opt = 'BT'.

append l_s_range to e_t_range.



endform. " execute_user_exit

Edited by: Heidi on Aug 3, 2011 9:58 PM