[ABAP] get_month_name

METHOD get_month_name.

   DATA: month_names TYPE TABLE OF t247.

   CALL FUNCTION 'MONTH_NAMES_GET'
     TABLES
       month_names = month_names
     EXCEPTIONS
       OTHERS      = 0.

   TRY.
       r_name = month_names[ mnr = i_month ]-ltx.

     CATCH cx_sy_itab_line_not_found.
   ENDTRY.

ENDMETHOD.

Leave a Reply

Your email address will not be published. Required fields are marked *