cancel
Showing results for 
Search instead for 
Did you mean: 

RFC Function Error: Cannot convert a value of 'MM/DD/YYYY' from type java.l

Former Member
0 Kudos

hi experts,

iam calling an RFC using SAP_JCO_Function. one of the input parameters is date which shud be in the format 'MM/DD/YYYY' but when i create a transaction property of data type DATETIME the format changes to " 2007-06-21 14:31:50 ". to refrain form passing this value at run time i have defined the transaction property as string and defaulted the value to MM/DD/YYYY.

When i execute the RFC i get the error "Cannot convert a value of 'MM/DD/YYYY' from type java.l".

Issue is with time field as well. Any suggestions would be appreciated.

Thanks,

Avinash

Accepted Solutions (0)

Answers (2)

Answers (2)

agentry_src
Active Contributor
0 Kudos

Avinash,

Generally RFC date fields want the date input as YYYYMMDD rather than what you show. Since I don't know which RFC you are using, I don't know if that would apply here. I would also try Manisha's suggestion when converting dates.

Good luck,

Mike

Former Member
0 Kudos

Hi

You can use datefromxmlformat( datetime, toformat ) .

in toformat you give: "MM/dd/yyyy" and in datetime you pass your xml format date like: 2007-06-21 T14:31:50.

Try like this. Hope this may help you.

Thanks