cancel
Showing results for 
Search instead for 
Did you mean: 

XI: RFC to JDBC scenario - handle JDBC Adapters Errors

Former Member
0 Kudos

In scenario could happened to ERP side try to insert an already saved record in receiver side SQL Server. when this happens XI returns a message structure like :

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<!-- Call Adapter

-->

<SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">

<SAP:Category>XIAdapterFramework</SAP:Category>

<SAP:Code area="MESSAGE">GENERAL</SAP:Code>

<SAP:P1 />

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'dbo.ZZTest01' (structure 'Statement_aux'): java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Violation of PRIMARY KEY constraint 'PK_ZZTest01'. Cannot insert duplicate key in object 'ZZTest01'.</SAP:AdditionalText>

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack />

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

But i need to read this error message and map to RFC response structure, how can i do that?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

As explained by bhavesh , you can have response message , see the below

/people/siva.maranani/blog/2005/09/16/xi-how-to-on-jdbc-receiver-response

Regards

Chilla

Former Member
0 Kudos

Chandra, my problem is not to know how a jdbc adapter respond a request, but how to threat a SAP Error Message from a JDBC Adapter, exactly like in your link, when de sxmb_moni presents the error message. this message i want to map to BAPI.response.

prabhu_s2
Active Contributor
0 Kudos

Daniel

Just a thought....check with pt# 3 in link provided by chilla. might be if u can figure out what strucutre that jdbc response give for error we can build the scenario. i havent tried that but we can check on that...also u can check if fault message type helps

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Shankar,

I can only see the message through the SXMB_MONI transaction,

and I would like to be able to send this message to the SAP.

Thanks!!

Former Member
0 Kudos

Hi Gustavo,

I'm having the same problem.

Can you solve your problem?

Thanks!!

Former Member
0 Kudos

Did you handle the fault message in your interface?

Former Member
0 Kudos

yes i tried it, but not resolved. I resolve the problem with a Block with Exception Lane in BPM, then i make a new mapping. thanks all

Former Member
0 Kudos

Hey Daniel

Could you explain your solution a little bit more in detail.

I am currently facing exactly the same problem, I want to extract the error message from JDBC adapter and forward it to the source system.

Better even would be without using BPM, but if you could solve the issue within a BPM I will try first your way.

I am just not sure about your "new mapping". Which structure you use in source and target message type?

Thanks very much

Karoline

Former Member
0 Kudos

Hi Karoline,

Well, i create a BPM process and put a Block Step with Exception Lane, so in normal lane a create a Send Step with the JDBC message, and when an error occurs the process goes to the Exception Lane and there a create a Transform Step with other mapping for de response message for the beginner step, something like:

1º) Receive Step: Sender system with open bridge;

2º) Transform Step: mapping de Sender message request to JDBC request message;

3º) Block Step:

3.1) Normal Lane: Send Step for JDBC Receiver System;

3.2) Exception Lane: Transform Step with a message mapping with a constant error message;

4º) Send Step: Sender System with closes bridge;

I couldn´t pick up the correct error message from jdbc driver, but in this model my process doesn´t stop with a JDBC error.

If you have an eMail address i can send to you my model.

Former Member
0 Kudos

Hi Daniel

Thank you very much for your answer.

But I have a definitiv requirement to send back the JDBC error message to the source system. That´s why I was so curious in the transform step, which message you get back from the database and which information it contains.

But it seems like an impossible mission.

Thanks again

Karoline

Former Member
0 Kudos

Hi Gustavo,

I'm having the same problem.

Can you solve your problem?

Thanks!!

Former Member
0 Kudos

Hi Daniel,

Use block exception & transform in BPM to capture error and send back to Rfc.

Regards

Former Member
0 Kudos

it is what I did, but this kind of message i have to build in design, and the structure is not standard. then, my doubt is really as setting up the structure for this message

bhavesh_kantilal
Active Contributor
0 Kudos

Daniel,

The ideal situation is to make a synchronous call on the JDBC adapter and get the response in terms of the number of successful inserts .

If you do not get a successful insert then you can use the exception handline blok to send the message etc.

But, if you want to trap the exact error message, then having independent alerts would be the way to go.

regards

Bhavesh

Former Member
0 Kudos

OK, my problem is exactly that, i am able to get sucessul answer, but on errors times is my problem. Do you hava any example of how to build these alerts for JDBC events?