How to Get Name of Months in ABAP/4
You can get name of months by select table ’T247’
DATA: it_month_name TYPE TABLE OF t247 WITH HEADER LINE.
SELECT * INTO TABLE it_month_name FROM T247
WHERE spras = sy-langu.
or using function module ’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.
Technorati Tags: English, Programming, ABAP, SAP
- 2475 reads
Post new comment