cancel
Showing results for 
Search instead for 
Did you mean: 

RFC <-> JDBC fault message

Former Member
0 Kudos

Hello All,

Probably this has been discussed before, but i am unable to find a direct solution till now.

I have a synchronous RFC to JDBC scenario, where data is inserted from R/3 to JDBC and JDBC returns with the count of records it inserted in oracle. everything is working fine.

But in case when there is an error in insert, short dump occurs in R/3. i can see the response message has the error that some fields are null and so the insertion failed.

My question is, how to capture this fault and get a exception equivalent in my RFC, so for further processing it can simply be check against SY-SUBRC.

I would appreciate any pointers or help on this.

Regards,

Kinshuk

Accepted Solutions (0)

Answers (2)

Answers (2)

martin_dejl2
Participant
0 Kudos

Hi Kinshuk,

one month ago I implemented also synch JDBC scenario but with call from client proxy (ABAP Proxy <->JDBC). First you ca try is to implement exception in your RFC and then update the metadata in IR. Assign also Fault Message to Inbound JDBC Message Interface and create mapping between RFC exception message and Fault Message.

If it will not help you, try to change your implementation to ABAP Proxy if possible. With Proxy you can use ABAP statement "TRY/CATCH" and catch system error as I do in my implementation.

As far as I know, JDBC adapter does not support Fault Messages. But I never had system with latest SP. For examply in this 1492453 note you can see, that the detail text message of exception in Adapter was not transfered to IS (sxi_monitor) in SP bellow 12. With proxy you should have access to that exception and it might be possible get the "detail text" from exception object.

On my current project I'm still waiting for SP so in my implementation I can catch Proxy exception but I'm not able to tell user what exactly happend. He has to check Comm.Channel monitoring for more info.

If you have SP12 or higher you should be able not only catch system exception but also to get the detail error text from JDBC Adapter back to your proxy implementation.

Martin

Former Member
0 Kudos

Hi Martin,

I implemented the solution as suggested by you. Although the JDBC error is not returned but the R/3 system gets a error response by system, so that i can notify the related users thats there was an error in that particular set of records using mail send from R/3.

Regards,

Kinshuk

Former Member
0 Kudos

There are couple of options,

1)Check, if you can raise an exception, while going to short dump.

2) Another option is to Get the response message back to R/3 system with long text & failed message.

Further, it can used for raising the exception.

Need to check options with debugging the code, while going for short dump.

Former Member
0 Kudos

Hi santosh,

Can you please explain how to get the message back to the RFC.

Regards,

Kinshuk

Former Member
0 Kudos

In the Response MM, transfer the field to RFC field( long text).

then, u can get this message in RFC.

As it is a Sync Scenario,it will end with return call to RFC.

Former Member
0 Kudos

Hi Santosh,

Thanks for the suggestion, but i don't think getting the error back to RFC was that simple, instead it always ends up in a dump in the R/3 system.

Regards,

Kinshuk