‎2010 May 04 11:54 AM
Dear Experts,
I want a function module which calculate the week number.
Suppose for date 04.05.2010
week is 19...........
i want to fetch through function module.
i have already tried function module like GET_WEEK_INFO_BASED_ON_DATE & DATE_GET_WEEK
throgh both function module output is come out is 18.
but i need 19.
when i pass 02.01.2010
then it giving 53 week of 2009.
plz. help me as soon as possible.
Thanks,
‎2010 May 04 11:57 AM
Hi shalini..
Use this Fm: GET_WEEK_INFO_BASED_ON_DATE....and ad 1
but why you need 19?because 04/05/2010 is the 18 week
Best regards
Marco
‎2010 May 04 12:08 PM
run 02.01.2010.
it is the 1st week of 2010.
But Function return 53 week of 2009.
Edited by: Shalini Singh on May 4, 2010 1:16 PM
‎2010 May 04 12:19 PM
hi Shalini,
All the FM given in sap standard for calulating week start calulating week from monday and if u see 02.01.2010 is saturday and that week start in 2009 so it is 53 th week of 2009. And 04.01.2010 is Ist week of 2010 .
So wat i would suggest is that either u get week from fm and change it according to requirement .
‎2010 May 04 12:26 PM
Jan 2 2010 was indeed 53rd week of 2009, so SAP FMs are returning right value. I would strongly recommend to consult your functional consultant before assuming Jan1 2010 as week 1 of 2010.
[quote from wikipedia|http://en.wikipedia.org/wiki/ISO_8601#Week_dates]
'If 1 January is on a Monday, Tuesday, Wednesday or Thursday, it is in week 01. If 1 January is on a Friday, Saturday or Sunday, it is in week 52 or 53 of the previous year (there is no week 00). 28 December is always in the last week of its year.'
Regards,
Pawan.
Edited by: Pawan Kesari on May 4, 2010 4:56 PM
‎2010 May 04 1:06 PM
HI
what are saying Pawan is correct....and how i said in my last post the Fm work correctly...
the Fm use the SAP standard week calculation.....
Regards
Marco
‎2010 May 04 12:22 PM
‎2010 May 04 1:09 PM
basic date question, "as soon as possible"...
Please don't reply to such questions!
Thread locked.
Thomas