cancel
Showing results for 
Search instead for 
Did you mean: 

Error while working on JDBC to RFC error

former_member460664
Participant
0 Kudos

Dear all,

I got following error while working on JDBC to BAPI scenario. Data has been picked by sender communication channel. In RFC receiver channel of RWB it is showing the following error.

MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$ConversionException: (122) JCO_ERROR_CONVERSION: Date '21.09.2012' has a wrong format at field PSTNG_DATE: Unparseable date: "21.09.2012"

Please help me. This is very important to solve the issue.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

zameerf
Contributor
0 Kudos

Hi Ashok,

>>Date '21.09.2012' has a wrong format at field PSTNG_DATE: Unparseable date: "21.09.2012"

The error is pretty descriptive.

Please check your BAPI in R/3 system for the field PSTNG_DATE and check for the expected date format.

Modify the input value 21.09.2012 in mapping according to the expected format.

This should resolve the issue.

-Zameer

former_member460664
Participant
0 Kudos

SQL database as well as BAPI having the same format ( dd.mm.yyyy). I dont want to change any thing in date format. I directly mapped to source field to target with out change. But BAPI supports only dd.mm.yyyy format. There is no such format in PI with dot(.). PI suppots only / : - formats. Please help me ....

zameerf
Contributor
0 Kudos

Can you try to use DateTrans function, then double click and manually give the date format as required.

It should be able to generate dd.mm.yyyy format.

Former Member
0 Kudos

PI suppots only / : - formats. Please help me ....

yes Zameer correct , that is possiable by using dateTrans standard function of DAte.

refer pS:

output date format select by manuly ....like (.)

former_member460664
Participant
0 Kudos

From source date format is dd.mm.yyyy............. and receiver is also same format (dd.mm.yyyy). Why do we use Date Transfer function?

Former Member
0 Kudos

Hi Ashok,

Have you tested the mapping? do some test with the source load, and see what it generates at field PSTNG_DATE. If wrong, use DateTrans and format your source to match your target.

Cheers,

Edu

Former Member
0 Kudos

no need to use  DateTrans simple map 1 to 1 . and once check ur Source and target payloads for format of the date field

former_member460664
Participant
0 Kudos

Thank you for your reply. Now I got it. But we are using same format (dd.mm.yyyy) in source as well as in target. Why do we go for Date Transfer function? In this scenario (Receiver is BAPI) I want to call BAPI_TRANSACTION_COMMIT to upload data in R/3 tables. I select only check box in RFC  CC that commit for single BAPI calls. Do I have to enter any data there? Please let me know?

former_member460664
Participant
0 Kudos

I have tested the MM in ESR. There is no error. what ever I have given source date format, the same appeared in targer as well. But in CC monitoring, It has shown the above error. I am using BAPI for this scenario.

Former Member
0 Kudos

okay , once u have to take the input payload from sxmb_moni then ll check in message mapping.

Former Member
0 Kudos

Hi Ashik,

as far as I know, BAPI only accepts YYYYMMDD. Give that a try!

cheers,

Edu

former_member460664
Participant
0 Kudos

It has worked fine.

former_member460664
Participant
0 Kudos

I asked ABAP guy for supported format. It is dd.mm.yyyy format.  We have  changed many formats from source to target and we tested as well. Every time we got the error with receiver date format which we have used. I am not able to find why it is coming like that?

Former Member
0 Kudos

Hi Ashok,

I've experienced some troubles with date, datetime... types between SQL, ORACLE, and ABAP. I've recommend if date type is not mandatory because of audit issues is to set those fields to STRING type

cheers,

Edu

former_member193393
Participant
0 Kudos

Hello Ashok,

While passing date to ECC, pls bear in mind that the length of date in ECC will be only 8. So you should pass date in the format: DDMMYYYY (I mean, without separators). What ever may be the input date format, use the corresponding DateTrans, but the output date format should be without any separators and should be only 8 in length.

Check in this perspective and try again.. It shud work..

Br,

SaiGanesh.

former_member460664
Participant
0 Kudos

As of your message I have changed receiver date format and tested...... the following error has come

Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$ConversionException: (122) JCO_ERROR_CONVERSION: Date '21092012' has a wrong format at field PSTNG_DATE: Unparseable date: "21092012"

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Ashok,

I'm pretty sure BAPI needs YYYYMMDD, also, there are some post with the same problem (i.e. http://scn.sap.com/thread/106553)

cheers,

Edu

former_member460664
Participant
0 Kudos

Thanks for your reply. Date error has been resolved now. It is givinng below error. Please help me.

Delivery of the message to the application using connection RFC_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientBapiException: BAPI not executed successful

Former Member
0 Kudos

Hi Ashok,

Is BAPI commit enabled and are all the parameters (user logon, client, etc...) properly set in RFC receiver cc?

cheers,

Edu

former_member460664
Participant
0 Kudos

I just check mark the option under Advanced mode.... commit Handling for single BAPI calls and I have given all user details.. Inaddition to that checkmark do I enter any data there???

former_member460664
Participant
0 Kudos

I am using BAPI as Asynchronous mode. Does BAPI should return something? without returning a value, BAPI thrown error?? I did not map BAPI response. I have mapped only Source structure to BAPI request. Should I map BAPI response to response datatype?

Former Member
0 Kudos

Hi,

I just don't know, please ask ABAP guy.

cheers,

Edu

former_member460664
Participant
0 Kudos

Thanks a lot to Eduardo Bertoni. My problem has been solved and executed successfully.

Former Member
0 Kudos

hi Ashok,

seems you've got different types of data both in target and source, did you check that?

Be carefull with datetime values at SQL and datetime at BAPI, usually raises problems.

Cheers,

Edu

Former Member
0 Kudos

hi ,

As per my understand, this is Application data specific  error so once you have to check date format in mapping level .

and compare source and target formats of the DAte field " PSTNG_DATE"

Message was edited by: S Sankar