‎2007 Mar 13 4:45 AM
I need to calculate the date of the following Sunday based upon the current date.Could you suggest how to go calculate the same and if there are any function modules to do the same.
‎2007 Mar 13 4:49 AM
Using the FM <b>HR_GB_DAY_RELATIVE_TO_DATE</b> if you give the current date it will give you the adding or subtracting u get Sunday date .
‎2007 Mar 13 4:50 AM
Hi,
Go to SE37 and enter GETDATE* you will get so many Fun modules,
use the relative one
Regards,
Anji
‎2007 Mar 13 4:51 AM
try this..
CALL Function 'GET_WEEK_INFO_BASED_ON_DAT'
exporting
date = ldate
importing
week = lweek
monday = lmon
sunday = lsun.
or use day_in_week FM and manuplate accordingl
‎2007 Mar 13 4:52 AM
‎2007 Mar 13 4:53 AM
Hi,
Try FM <b>HR_GB_DAY_RELATIVE_TO_DATE</b>
reward if useful.
‎2007 Mar 13 5:04 AM
HI sandeep this will give u the best results....
parameters:
p_date like sy-datum ." here u give the required date
data:
w_date1 type i,
w_mod type i.
w_date1 = p_date.
* write: / p_date1.
w_mod = w_date1 mod 7.
write: / w_mod.
if w_mod ne 0.
w_date1 = w_date1 + ( 7 - w_mod + 1 ).
else.
w_date1 = w_date1 + 1.
endif.
move w_date1 to p_date.
write: / 'the following sunday is ',p_date.
I hope it will helps u..
if helps reward with points..
Regards Rk..
null
‎2007 Mar 13 5:13 AM
The following are some of the function Modules which may help you...
<b>GET_WEEK_INFO_BASED_ON_DATE</b>
<b>LAST_WEEK</b>
<b>NEXT_WEEK</b>
<b>DATE_TO_DAY</b>
<b>TIME_CONVERSION</b>
<b>LOOK_FOR_TIME_TABLE</b>
<b>CONVERT_TIME_TERMS</b>
Reward if it helps you....
‎2009 May 20 11:27 AM