08-02-2012 2:38 PM
Hi Team,
Is there any FM similar to date_get_week to get day of the week but based on the calculation using Sunday to Saturday a Week.
Currently, DATE_GET_WEEK calculates based on a week considering it has Monday to Sunday. But my requirement the calculation should consider from Sunday to Saturday has a week.
Please advise.
Note:It is a BW System.
Regards
Sunil Kumar.
08-02-2012 3:06 PM
You could try an implementation of enhancement spot CALENDAR_DEFINITION, in method GET_FIRST_DAY_OF_WEEK you can set the first day of the week. This will reflect in DATE_GET_WEEK.
Speak to your system administrator, as this might have effects elsewhere.
Also look at SAP note 1063178 for some background.
Thomas
08-02-2012 3:06 PM
You could try an implementation of enhancement spot CALENDAR_DEFINITION, in method GET_FIRST_DAY_OF_WEEK you can set the first day of the week. This will reflect in DATE_GET_WEEK.
Speak to your system administrator, as this might have effects elsewhere.
Also look at SAP note 1063178 for some background.
Thomas
08-02-2012 3:20 PM
Hi Thomas,
Thanks for answering but I cannot change the enhancement spot because it will get effected the other calculations.
Regards,
Sunil Kumar.
08-02-2012 3:29 PM
How about adding 1 to the returned week number if the day is a Sunday?
Better double-check that this gives the correct result in all cases
Thomas