cancel
Showing results for 
Search instead for 
Did you mean: 

how to use an exception handler

samantha_nez
Participant
0 Kudos

Hi,

I'm trying to use exceptions into BPM. I have a BAPI that can return an exception using a fault message.

After asyn receiver, I have definied a block with a exception branch where I define the exception handler, and a deadline branch where I use my syn sender (that can receive the exception) and a control step to throw it. After block, I use an asyn sender to send final result.

However, I get this error in the moni:

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

<SAP:Category>Application</SAP:Category>

<SAP:Code area="RFC_ADAPTER">APPLICATION_ERROR</SAP:Code>

<SAP:P1 />

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="http://nsBPM_050207">MT_FAULT</SAP:ApplicationFaultMessage>

<SAP:Stack />

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

</SAP:Error>

How could I use an exception handler to control exceptions?

Thanks,

Samantha.

Accepted Solutions (0)

Answers (2)

Answers (2)

udo_martens
Active Contributor
0 Kudos

Hi Samantha,

the error message is an <b>application</b> error, coz exception in the function modul. You design a mapping to give back values to fault message type. For system errors you define an exception branch for your block and put that exception to the send step. In case of that errors process jumps into the exception branch, where you decide what to do, for example stop process, alert somebody or send a error message to somewhere.

Regards,

Udo

Former Member
0 Kudos

Hi Samantha,

in BPM, the place where you are calling the BAPI, put it in block.....in its exception branch, put a recieve step of msg type MT_FAULT....Then in this branch, put a deadline step to stop the BPM process....

Thanks,

Rajeev Gupta