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.
———————
ABAPer, mail: abap.community@gmail.com http://www.erpdb.info
If you like this post, you may as well like these too:
- ABAP Programs: Date and Time REPORT ZSOURCE0405. * Date fields are type d with the fixed length 8 and the internal* representation YYYYMMDD (year, month, and day).* The initial value of a date field is...
- ABAP Programs: Converting date fields * Using the built-in calendarDATA: RECEIVING_DATE TYPE D, LAST_ADMISSIBLE_DATE TYPE D. RECEIVING_DATE = ’19980223′.LAST_ADMISSIBLE_DATE = RECEIVING_DATE + 10.WRITE / LAST_ADMISSIBLE_DATE. RECEIVING_DATE = ’19980305′.LAST_ADMISSIBLE_DATE = RECEIVING_DATE + 10.WRITE / LAST_ADMISSIBLE_DATE. RECEIVING_DATE...
- Calculate Planned Activity Output Through Long Term Planning In Long term planning process the planned production quantities are entered for the planning year in a particular scenario. The Long term planning is executed for the scenario. This generates...
- SAP TechEd 2007 Want to download the SAP TechEd 2007 files faster. Here is a link from sapintel to download all the 130 presentation files from SAP TechEd....
- SAP Customer Relationship Management 2007 SAP CRM (Customer Relationship Management) 2007 Download from Rapidshare or Mediafire. Course Contents: Chapter 1 About this Document . . . . . . . . . . . ....
- Program to Generate 3D graphics Simple report to create graph in ABAP using GRAPH_MATRIX_3D function module. The graph shows the performance of 3 companies for the Four quarters of a single year.The Complete code with...
- How do you generate an automatic PO after creating a PR using a particular material? In MMR and VMR check Auto PO (MM02/XK02). Maintain the Source List and select the indicator for the source list record as MRP relevant (ME01). If more than one source...
- Generate Temporary ABAP Program Ever had a need to create a temporary program during the run time. Here is a simple program which will allow you to learn that. REPORT ZSOURCE2501. * Internal table...



















Leave a Reply