DATA: xweek(6) TYPE n,
xdt TYPE d.
xdt = '20050101'.
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
DATE
= xdt
IMPORTING
WEEK
= xweek
EXCEPTIONS
DATE_INVALID
= 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:/ xdt.
WRITE:/ xweek.
Serkan AKKAVAK
Computer Engineer
ABAP Developer & SAP MM SD Consultant
Contact : serkurumsal@yandex.com
Social Plugin