‎2005 May 15 2:05 PM
Hi all,
My SAP system is generating date format as 15.05.2005.., in my table I have to update fields with Sy-datum... in this case field format should be DDMMYY...... do you have any solution for this.
Thanks & Regards
R Nittala.
‎2005 May 15 2:14 PM
Hello,
Have a look at FM CONVERT_DATE_TO_INTERNAL before table update.
Regds, Murugesh AS
‎2005 May 15 5:36 PM
Easiest would be as below
concatenate sy-datum+6(2)
sy-datum+4(2)
sy-datum+2(2)
into v_myfield.Regards,
Srinivas
‎2005 May 15 5:55 PM
Hello Rajesh,
the display format e.g. 15.05.2005 is a user setting. You may change this via the menu 'user data/own data/fixed values/date format'.
The ABAP runtime internally uses the format 'YYYYMMDD'. When using standard screen io (list, dynpros, ALV, BSP, Web Dynpro ..) the runtime system converts the internal representation to the display one. So normally you do not need to do a explicit conversion. One exception maybe the import of legacy data.
Best Regards
Klaus
‎2005 May 16 4:34 AM
Hi,
Try this out.
Using the WRITE statement
***************************
data: gd_date(10). "field to store output date
Converts date from 20020901 to 01.09.2002
write sy-datum to gd_date dd/mm/yyyy.
Converts date from 20020901 to 01.09.02
write sy-datum to gd_date dd/mm/yy.
Using data manipulation techniques
************************************
data: gd_date(8). "field to store output date
Converts date from 20010901 to 01092001
gd_date(2) = sy-datum+6(2).
gd_date2(2) = sy-datum4(2).
gd_date+4(4) = sy-datum(4).
Thanks & Regards,
Judith.