Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Error 'Enter a valid date (for example, 28.12.2007)' convert from excel

Former Member
0 Kudos
7,582

hi all,

error date:

when i upload excel file to SAP convert date 'Enter a valid date (for example, 28.12.2007)'

Types: begin of t_upload ,

material like BAPISITEMR-MATERIAL,

plant like BAPISITEMR-PLANT,

col1(10),

end of t_upload.

data: i_upload TYPE STANDARD TABLE OF t_upload WITH HEADER LINE,

w_upload TYPE t_upload.

data: SCHEDULE_IN like BAPISSHDIN occurs 0 WITH HEADER LINE,

FORM Get_date.

READ TABLE i_upload INDEX 1.

SCHEDULE_IN-DATE_TYPE = '1'.

CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'

EXPORTING

DATE_EXTERNAL = i_upload-col1

IMPORTING

DATE_INTERNAL = SCHEDULE_IN-REQ_DATE.

APPEND SCHEDULE_IN.

endform.

in excel formort date 12122007 (example)

pls, help me.

thanks so much/Tham.

1 REPLY 1

Former Member
0 Kudos
868

Hi,

The reason for this problem is the internal date format is not matching with the excel data. you

Check date format :

System -> User profile -> Own data -> default.

Select DD.MM.YYYY.

SAVE the data and logout. Relogin and execute , it works fine.