‎2010 Nov 02 11:57 AM
Hello everyone,
I need a Function Module which will take Week No as an input Parameter & return me the date range
(From date & To date of that week) .
Thanks in advance!
Cheers!
Moderator message: date calculation questions = FAQ, please search before posting.
Edited by: Thomas Zloch on Nov 2, 2010 5:25 PM
‎2010 Nov 02 12:12 PM
Hi,
I dont think you will get in Standard, Please find available FM here http://wiki.sdn.sap.com/wiki/display/ABAP/ImportantFunctionModule+Names
Regards
GK.
‎2010 Nov 02 12:35 PM
Hi,
Please check FM LAST_WEEK.
Pass the year and week number in input ( YYYYWK).
Thanks,
Anmol.
‎2010 Nov 02 12:45 PM
Hi,
Please write the below logic..
data : v_date11 type sy-datum,
monday type sy-datum,
sunday type sy-datum,
v_count1 type i .
*v_count1 = 20 * 7. " Say U want details for 20th week , or give a parameter for week and multiply with 7*
v_date11 = '20100101'. " take the starting day of the year ....
v_date11 = v_date11 + v_count1. " add to the date
CALL FUNCTION 'GET_WEEK_INFO_BASED_ON_DATE' <-- call this FM
EXPORTING
DATE = v_date11
IMPORTING
WEEK = WEEK
MONDAY = MONDAY <-- will have the week starting day
SUNDAY = SUNDAY
Regards,
Srini.