Application Development and Automation 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: 
Read only

Enter a valid date (for example, 11.02.2021) Iam getting this error while uploading the file.

Former Member
0 Likes
2,768

Enter a valid date (for example, 11.02.2021) Iam getting this error while uploading the file. thorugh GUI_UPLOAD I have used CONVERT_DATE_TO_INTERNAL' plz help on this

Enter a valid date (for example, 11.02.2021) Iam getting this error while uploading the file. thorugh GUI_UPLOAD I have used CONVERT_DATE_TO_INTERNAL' plz help on this

3 REPLIES 3
Read only

maulik
Contributor
0 Likes
1,995

1. Check your user defaults

2. Provide more info, code, screen shot, etc

Read only

Former Member
0 Likes
1,995

DATA :BEGIN OF LS_FINAL,

BUDAT(10).

ENDOF LS_FINAL.

CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'

EXPORTING
DATE_EXTERNAL = LS_FINAL-BUDAT
IMPORTING
DATE_INTERNAL = LS_FINAL-BUDAT
EXCEPTIONS
DATE_EXTERNAL_IS_INVALID = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LS_DOCHEADER-PSTNG_DATE = LS_FINAL-BUDAT.

In file I am giving 01.01.2020 format in debug it showing 20200101(yyyymmdd)

PLZZ help me on this.

Read only

Abinathsiva
Active Contributor
0 Likes
1,995

Hi,

Through debug mode find the format of date and convert using concatenate keyword...

CONCATENATE tab-purch_date+4(4) tab-purch_date+2(2) tab-purch_date+0(2) INTO tab-purch_date.