ERP Database - The Unofficial ERP Knowledge Base

Facebook Twitter del.icio.us Digg it
ERP Database contains a huge collection of articles related to ERP System and Software. Many of the articles are specifically related to SAP. All these ERP/SAP articles are freely available to everyone.

If you would like to submit an article or share any document related to ERP or any specific ERP software. Please mail it to support@erpdb.info. Please make sure that the documents are not copyrighted.
Social Bookmarks:

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

Print This Post Email This Post Written by admin on Oct 17th, 2007 | Filed under: ABAP, ABAP Programs

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

Share

If you like this post, you may as well like these too:

  1. 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...
  2. 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...
  3. 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...
  4. 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....
  5. SAP Customer Relationship Management 2007 SAP CRM (Customer Relationship Management) 2007 Download from Rapidshare or Mediafire. Course Contents: Chapter 1 About this Document . . . . . . . . . . . ....
  6. 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...
  7. 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...
  8. 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