2008 Dec 04 9:56 AM
Hi,
I want FM for get the date of next friday.
Thanks.
2008 Dec 04 10:31 AM
Hi,
You can use the following FM /OSP/GETDATE_WEEKDAY to retrieve the date of next occuring week day so you can add up 4 days to the date will give you fridays date.
Regards,
anil
2008 Dec 04 10:42 AM
Hi,
just as an addition to anil's suggestion:
DATA: NEXT_FRIDAY TYPE /OSP/DT_DATE.
CALL FUNCTION '/OSP/GETDATE_WEEKDAY'
EXPORTING
IV_DAY_OF_WEEK = 5
IV_START_DATE = SY-DATUM
IV_TIME = '235959'
IMPORTING
EV_DATE_DAY_OF_WEEK = NEXT_FRIDAY.
EXCEPTIONS
INVALID_DAY = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
WRITE NEXT_FRIDAY.
Regards
Joe
2008 Dec 04 10:56 AM
2008 Dec 04 11:03 AM
2008 Dec 04 11:18 AM
Yes. Of course.
1 - Call FM: 'DATE_GET_WEEK' for get the number of week
2 - Call FM: 'WEEK_GET_FIRST_DAY' for get monday date
3 - monday date + 4
2008 Dec 04 11:19 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |