Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

dates

Former Member
0 Likes
651

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

1 ACCEPTED SOLUTION
Read only

JoffyJohn
Active Contributor
0 Likes
630

Use function module DATE_COMPUTE_DAY

to get the weekday for a date.

please check the function module documentation

5 REPLIES 5
Read only

Former Member
0 Likes
630

Hi ,

Use follwing FMs...

DATE_CONVERT_TO_FACTORYDATE

FACTORYDATE_CONVERT_TO_DATE

Read only

Former Member
0 Likes
630

Hi,

DATE_CHECK_WORKINGDAY to check if its a working day.

Also try DATE_CONVERT_TO_WORKINGDAY.

Read only

Former Member
0 Likes
630

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

Read only

Former Member
0 Likes
630

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.

Read only

JoffyJohn
Active Contributor
0 Likes
631

Use function module DATE_COMPUTE_DAY

to get the weekday for a date.

please check the function module documentation