,

How to generate a long date like "2 januari 2007" from "20070102".

How to generate a long date like "2 januari 2007" from "20070102".
DATA my_date TYPE DATUM.
my_date = '20070502'.

DATA wa_dates LIKE TABLE OF T247 WITH HEADER LINE.
DATA wa_date LIKE TABLE OF T247 WITH HEADER LINE.
DATA long_date TYPE STRING.

CALL FUNCTION 'MONTH_NAMES_GET'
EXPORTING
LANGUAGE = SY-LANGU
TABLES
month_names = wa_dates.

.
IF sy-subrc eq 0.
READ TABLE wa_dates INTO wa_date
WITH KEY MNR = my_date+4(2).
CONCATENATE: my_date+6(2) wa_date-ltx my_date+0(4) INTO long_date SEPARATED BY SPACE.
ENDIF.

write: long_date.

Check out the APAP tutorials page for more sample program.

ERP Avatar

One response to “How to generate a long date like "2 januari 2007" from "20070102".”

  1. sklep online Avatar

    Wow, amazing weblog layout! How long have you been running a blog for?
    you made blogging look easy. The entire look of your
    site is great, let alone the content material! You can see similar here
    sklep online

Leave a Reply

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