PARAMETER: W_DATE like sy-datum.
DATA:
W_BUSDAY TYPE D.
DATA: DAY_ATTRIBUTES TYPE STANDARD TABLE OF CASDAYATTR INITIAL SIZE 1
WITH HEADER LINE.
DO.
W_DATE = W_DATE + 1.
*Initial clean up of Day attributes
CLEAR DAY_ATTRIBUTES .
REFRESH DAY_ATTRIBUTES .
CALL FUNCTION 'DAY_ATTRIBUTES_GET'
EXPORTING
HOLIDAY_CALENDAR = 'US'
DATE_FROM = W_DATE
DATE_TO = W_DATE
LANGUAGE = SY-LANGU
TABLES
DAY_ATTRIBUTES = DAY_ATTRIBUTES.
IF SY-SUBRC <> 0.
ENDIF.
READ TABLE DAY_ATTRIBUTES INDEX 1.
IF DAY_ATTRIBUTES-HOLIDAY NE 'X' AND DAY_ATTRIBUTES-WEEKDAY NE
'7' AND DAY_ATTRIBUTES-WEEKDAY NE '6'.
EXIT.
ENDIF.
ENDDO.
write: W_DATE .
No comments:
Post a Comment