Google Search - Blog...........

ABAP - How To Get All Month Names

REPORT zdates.


data: MONTH_NAMES like T247 occurs 0 with header line .


CALL FUNCTION 'MONTH_NAMES_GET'
EXPORTING
LANGUAGE = SY-LANGU
TABLES
month_names = month_names
EXCEPTIONS
MONTH_NAMES_NOT_FOUND = 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.


loop at month_names.

write:/ month_names-LTX, month_names-mnr .
endloop.

No comments:

Post a Comment