cancel
Showing results for 
Search instead for 
Did you mean: 

Jco date conversion error

Former Member
0 Kudos

Hi All,

i'm calling an RFC from XI which accepts date in the form dd.MM.yyyy. i'm doing the request mapping which will convert date from dd/MM/yyyy format to dd.MM.yyyy using the fuction <b>datetrans</b>. when i'm executing the rfc from se37 with date in the format dd.MM.yyyy its giving me the appropriate output. But from XI during runtime its showing the error as below.

RFC:com.sap.mw.jco.JCO$ConversionException: (122) JCO_ERROR_CONVERSION: Date '15.11.2006' has a wrong format at field FROM_DATE: Unparseable date: "15.11.2006"

Can anyone solve it

regards,

nisheeta

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Michal,

Having exactly the same problem. I pass the date in the format YYYYMMDD and still I have an error as per the XML below:

<rate_type>M</rate_type>

<from_curr>AUD</from_curr>

<to_curr>USD</to_curr>

<valid_from>20070101</valid_from>

<exch_rate>11.50</exch_rate>

<from_factor>1</from_factor>

<to_factor>1</to_factor>

But the adapter gives an error and it seems that it converts it to DDMMYYY. The error is as follows:

Exception caught by adapter framework: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$ConversionException: (122) JCO_ERROR_CONVERSION: Date '01012007' has a wrong format at field VALID_FROM: Unparseable date: "01012007"

So I don't know what date format I'm supposed to pass in the XML. Any ideas would be great.

Thanks, Warren

Former Member
0 Kudos

Hi Nisheeta,

As far as I know, the BAPI only accepts date in the format of YYYYMMDD.

cheers,

Prashanth

Former Member
0 Kudos

HI,

I feel the format should be yyyymmdd for standard DATUM domain

Thanks,

Tuhin

Former Member
0 Kudos

Hi Nisheeta,

If the date is of type string, it should be in the format YYYYMMDD.

cheers,

Prashanth

P.S Please mark helpful answers

MichalKrawczyk
Active Contributor
0 Kudos

hi,

test function in SE37 sometimes changes the date:

try to use the target date in XI: 20061115 in the mapping or 15112006

one of these two should work

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Former Member
0 Kudos

Hi All,

Actually XI is accepting the date from a webservice which will give it in the format dd/MM/yyyy and before calling the rfc we are doing the conversion to dd.MM.yyyy.

Michal,

when we tested the rfc using test function its givin us output with the date given as dd.MM.yyyy

the error on detail is as below

com.sap.aii.af.ra.ms.api.DeliveryException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$ConversionException: (122) JCO_ERROR_CONVERSION: Date '15.11.2006' has a wrong format at field FROM_DATE: <b>Unparseable date</b>: "15.11.2006"

Regards

MichalKrawczyk
Active Contributor
0 Kudos

hi,

>>>>when we tested the rfc using test function its givin us output with the date given as dd.MM.yyyy

I know ... but read my answer -> it's only when you do the test

specify it like I said with no "."

Regards,

michal