cancel
Showing results for 
Search instead for 
Did you mean: 

Abap Proxy exception Handling

Former Member
0 Kudos

Hi guys,

I've implemented the following scenario:

BPM Process where I've got a async receive (from a file receiver), a sync send (to an ABAP PROXY) and a send async (to a file sender).

The scenario is working great, I've catched 'Communication exceptions', and the proxy contemplates the necessary exception throwers too, but I'm now trying to Handle one specific exception. Imagine you force a dump, with a divide by zero in the proxy code...the proxy will dump and the XI gets a mapping exception (like is supposed to).

The exception is:

<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>

<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>

<SAP:P3>RuntimeException in Message-Mapping transformatio~</SAP:P3>

The thing is, I want to catch this exception on the mapping and handle it, so the bpm process sends the handle response with the file sender.

I've looked to Alessandro Guarneri blog, but it's a little bit different, because I don't want to throw an exception but I'd like to handle it....

Can you guys help me with this question?

Accepted Solutions (1)

Accepted Solutions (1)

agasthuri_doss
Active Contributor
0 Kudos

Hi,

This will help you

/people/bhanu.thirumala/blog/2006/02/07/abap-proxy--xml-to-abap-transformation

Regards

Agasthuri Doss

Answers (1)

Answers (1)

Former Member
0 Kudos

Hey guys....can anyone give me any hint...?

The divide by zero error is not the one that I've posted before, but

<SAP:Category>XIProxy</SAP:Category>

<SAP:Code area="ABAP">DYNAMIC_CALL_FAILURE</SAP:Code>

<SAP:P1>COMPUTE_INT_ZERODIVIDE</SAP:P1>

<SAP:P2>ZGDCCL_MI_POST_SAPREQ</SAP:P2>

<SAP:P3>EXECUTE_SYNCHRONOUS</SAP:P3>

<SAP:P4 />

<SAP:AdditionalText>Unable to execute the dynamic application call (kernel error ID COMPUTE_INT_ZERODIVIDE, class ZGDCCL_MI_POST_SAPREQ, method EXECUTE_SYNCHRONOUS)</SAP:AdditionalText>

<SAP:ApplicationFaultMessage namespace="" />

Can anyone help me?

I can catch this exception in the BPM, but only with a general exception text...I wanted to be more specific...is it possible?

Message was edited by: Gonçalo Mouro Vaz

Former Member
0 Kudos

Hi,

One option would be to try catching the exception in the Proxy itself.

I have not tried this myself but can u check out the code at the end if this is what u are looking for.

http://help.sap.com/saphelp_nw04/helpdata/en/a1/082589fc4246f09793039d5fb01a17/content.htm

regards

Vijaya

Former Member
0 Kudos

Hi Vijaya,

I was able to catch the exception like you said, on the proxy side.

I'm trying to conceive some real and feasible dumps scenarios and for that I'm forcing dumps, and catching exceptions. Divisions by zero was one of the examples.

For division by zero I was able to catch it with a cx_sy_no_handler exception, but I've another example which I'm not being able to catch it.

I'm sendind an message e001(zisa), which will exit automatically from the function module. Am I able to catch that message? Meaning, can I catch it and treat it, instead of the system exiting the function and showing the corresponding message?Is there any cx_* ?

Even better, on sxmb_moni I get:

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

<SAP:Category>XIServer</SAP:Category>

<SAP:Code area="INTERNAL">HTTP_RESP_STATUS_CODE_NOT_OK</SAP:Code>

<SAP:P1>500</SAP:P1>

<SAP:P2>Internal Server Error</SAP:P2>

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText><html> <body> <H1> 500 SAP Internal Server Error </H1> <B> Error message: </B> O centro nao existe ou nao esta preenchido. ( <B> type of termination: </B> ERROR_MESSAGE_STATE ) <BR /> </body> </html></SAP:AdditionalText>

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>HTTP response contains status code 500 with the description Internal Server Error Error when sending by HTTP (error code: 500, error text: Internal Server Error)</SAP:Stack>

<SAP:Retry>N</SAP:Retry>

</SAP:Error>

So, the SOAP adapter receives something. If it's not possible to catch this exception on the abap proxy side, can I catch and map that soap adapter error text on the BPM side?

Thanks a lot for all of your attention

Former Member
0 Kudos

Hi,

If you are raising an exception in the finction module then you can catch them in the function module itself.

I am just assuming here that you have a sender proxy. so if you have an error then:

1. don't call the proxy

2. if its mandatory to send data to the soap then call proxy by updating some error message.

In this case you avoid creating any dump.

also, go through this RRL that gives you all the options:

http://help.sap.com/saphelp_nw04/helpdata/en/25/a45c3cff8ca92be10000000a114084/content.htm

Regards

Vijaya

Former Member
0 Kudos

Hi Vijaya,

relating to your first question. Yes, I'm forcing a dump in the function module but I don't know what type of exception is, so that I can catch it.

I want to catch that exception so that I can raise the ABAP proxy exception, and XI gets it as an exception and not as an error.

Do you know how can I catch this exceptions?