Skip to Content
0
Former Member
Sep 04, 2006 at 05:45 AM

variable with low value as first day of year and high as key date

12 Views

hi all,

i need to create a variable with key date for which the low value should be 1st day of the year,

means if i enter a key date (5/9/06) the values to appear should be from 1/1/06 to 5/9/06.

If i want the manipulation based on key date like key date + 90 etc. is it possible?

i have written a customer exit as

case i_vnam.

when 'keydate'

clear : e_t_range,

l_t_range.

DATA DAT(8)TYPE D.

LOOP AT i_t_var_range INTO loc_t_var_range.

IF loc_t_var_range-vnam = 'keydate'.

loc_found = 'X'.

EXIT.

ENDIF.

ENDLOOP.

DAT = loc_t_var_range-vnam .

if loc_found = 'X'.

l_s_range-sign = 'I'.

l_s_range-opt = 'BT'.

CONCATENATE sy-datum(4) '01' '01' INTO l_s_range-low.

l_s_range-high = DAT.

APPEND l_s_range TO e_t_range.

ENDIF.

WILL THIS CODE WORK.

I FEEL THERE IS PROBLEM WITH L_T_RANGE- HIGH.

IS THERE A DICREPENCY IN THE CODE?

IS THE CALLING SEQUENCE OF THE VARIABLE CORRECT?

PLZ LET ME KNOW.

THANK U ALL