cancel
Showing results for 
Search instead for 
Did you mean: 

Error Handling for ABAP Proxy sender

Former Member
0 Kudos

Hello Everyone,

I am trying out a scenario of SAP R/3 to Oracle database (ABAP Proxy to JDBC).

I have the following code and it works fine.

CALL METHOD prxy->execute_asynchronous

EXPORTING

output = it.

commit work

.

CATCH cx_ai_system_fault .

DATA fault TYPE REF TO cx_ai_system_fault .

CREATE OBJECT fault.

WRITE 😕 fault->errortext.

I know that the above Catch block would be used to handle system errors on the sender side.

Please tell me what kind of errors could these be and what I can do to test these errors. ie. I want to create error situations explicitely and see how they are handled.

Thanks and Regards,

Ashwin

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos
ashwin_bhat
Participant
0 Kudos

Thanks guys, this was useful.

My scenario is for Asynchronous communication.

I guess Fault messages are used in case of Synchronous communication for handling application errors. So if there was something wrong at the JDBC end then I could use the fault messages.

Have i got this right?

I also came across this piece on Acknowledgements. But is says that they can be used with the following Receivers:

The following receivers support acknowledgments:

ABAP and Java proxies (XI 3.0 SP1 for the latter)

Integration processes

IDocs (note that IDocs only return acknowledgments when they have been configured using the ALE audit)

Receiver adapters support system acknowledgments but not application acknowledgments

My Receiver is JDBC. So I guess I cannot use acknowledgements either.

Hence, I need to know what I can do to replicate the system errors eg. failed server etc...so that I can get catch these errors during sending.

I'll tell you abt what happened earlier.

My XI server was down. I executed the code for the sender ABAP Proxy and it did not catch the error. In SXMB_MONI in the R/3 system, I could see the messages queued up. When the XI server started, the messages were transferred to XI.

I need to handle such errors...ie. If the server is down or message did not reach XI then my ABAP program that sends data via ABAP proxy needs to know that something went wrong.

Thanks and Regards,

Ashwin

Former Member
0 Kudos

Hi

>>>

I guess Fault messages are used in case of Synchronous communication for handling application errors.

Have i got this right?

I am afraid your understanding contradicts mine.

Fault messages can also be used in Asnc commn where the fault message can be persisted.

>>> So if there was something wrong at the JDBC end then I could use the fault messages.

I believe Fault messages are very similar to exception handling in a oop language like java. Thus, the fault message will be called when there is an application./system error in the executing code. Here the code is an abap proxy. Thus, if there is any error in the JDBC side, the abap proxy has no idea about the error and so i doubt if you would be able to use the fault message at the sender abap proxy to capture the error message

regards

krishna

Former Member
0 Kudos

Ashwin

I have more info for you

Check the following thread and dont forget to go thru Bhaveshs response which might eventually lead you to get your problem solved

regards

krishna

Shabarish_Nair
Active Contributor
0 Kudos

if you are talking about the fault message to be send to XI, note that

<i>A fault message type is a special message type that can be used in message interfaces. As with a message type, a fault message type is made up of data types (see below).<b> Fault message types are not permitted for asynchronous outbound message interfaces</b>.</i>

To see how they work in an inbound interface ref,

Fault messages -

/people/shabarish.vijayakumar/blog/2006/11/02/fault-message-types--a-demo-part-1