12-25-2007 4:27 PM
hallow
i get from user period like beg_date 012007 and end_date 122007 and i wont to build range table for between this period how i can do that ?
Regards
12-25-2007 5:39 PM
Hi
declare a range like
ranges: r_date for s021-spmon. (declare as per your data type for the date)
in initialization event write.
r_date-low = '012007'. (enter the required lower range of value)
r_date-sign = 'I'.
r_date-option = 'BT'.
r_date-high = '122007'.
append r_date.
now use the r_date field in the program code.
Regards
Anji
12-25-2007 4:37 PM
*Range for plants <<<<< change it to date format
MOVE 'I' TO ra_werks-sign.
MOVE 'EQ' TO ra_werks-option.
MOVE beg_date TO ra_werks-low. <<<<<
APPEND ra_werks.
CLEAR ra_werks.
MOVE end_date TO ra_werks-low. <<<<<<
APPEND ra_werks.
CLEAR ra_werks.
12-25-2007 5:39 PM
Hi
declare a range like
ranges: r_date for s021-spmon. (declare as per your data type for the date)
in initialization event write.
r_date-low = '012007'. (enter the required lower range of value)
r_date-sign = 'I'.
r_date-option = 'BT'.
r_date-high = '122007'.
append r_date.
now use the r_date field in the program code.
Regards
Anji
12-25-2007 6:56 PM
Hi,
DATA beg LIKE SY-DATUM.
DATA end LIKE SY-DATUM.
beg+0(3) = '01/'.
beg3(2) = beg_date0(2).
beg+5(1) = '/'.
beg6(4) = 'beg_date2(4).
end+0(3) = '01/'.
beg+5(1) = '/'.
beg6(4) = 'beg_date2(4).
then use FM MONTH_PLUS_DETERMINE to increase the month by 1.
assign this month to end+3(2).
subtract 1 form end, that will be the last date of the previous month.
then use between operator. u don't need to use range.
Reward if useful
Regards
ANUPAM