1 使用数据表 ’T247’
DATA: it_month_name TYPE TABLE OF t247 WITH HEADER LINE.
SELECT * INTO TABLE it_month_name FROM T247 WHERE spras = sy-langu.
2 使用函数’MONTH_NAMES_GET’
DATA: it_month_name TYPE TABLE OF t247 WITH HEADER LINE.
CALL FUNCTION ’MONTH_NAMES_GET’
EXPORTING
LANGUAGE = SY-LANGU
* IMPORTING
* RETURN_CODE =
TABLES
MONTH_NAMES = it_month_name
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.