‎2007 Nov 06 9:13 AM
Hi all,
I have added dates as 26.10.2007 + 17 = 18.11.2007.
Now the requirement is if 18.11.2007 is either saturday or sunday (it means it is aholiday according to factory calender) then it should display previos working day(in this case it is 16.11.2007 FRIDAY).How to do it.
Regards,
Shoban
‎2007 Nov 06 9:38 AM
Use function module DATE_COMPUTE_DAY
to get the weekday for a date.
please check the function module documentation
‎2007 Nov 06 9:17 AM
Hi ,
Use follwing FMs...
DATE_CONVERT_TO_FACTORYDATE
FACTORYDATE_CONVERT_TO_DATE
‎2007 Nov 06 9:17 AM
Hi,
DATE_CHECK_WORKINGDAY to check if its a working day.
Also try DATE_CONVERT_TO_WORKINGDAY.
‎2007 Nov 06 9:18 AM
Hi,
use fm DATE_TO_DAY to get the day of the week.
If sunday u do "date -2" else if saturday date-1
rgs
‎2007 Nov 06 9:31 AM
hi
in SAP you have many function modules who you can use for asking if a day is a working day (factory day).
if you look via model->function module and you search for
working day you will find a lot of function modules who can tell you if the
specified day is a working day. Something like DATE_CHECK_WORKINGDAY
After that you can find a function module which the search parameter
dayweek* who can tell you which day it is, saturday, sunday, monday,
i should do that because a not working day can also be a holiday which is on wednesday.
‎2007 Nov 06 9:38 AM
Use function module DATE_COMPUTE_DAY
to get the weekday for a date.
please check the function module documentation