cancel
Showing results for 
Search instead for 
Did you mean: 

BPM Exception handling for RFC errors

Former Member
0 Kudos

Hi all

I have to handle the exception which would be like below:

com.sap.aii.af.ra.ms.api.DeliveryException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not get a client from JCO.Pool: com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed

I am trying to put Block step and things are not working fine. Can anyone please explain me the steps to trap the exception?

My scenario has synchronous call to RFC FM.

Rightnow i have inserted Exception branch in my Block step and put the send step to write the error file. I have put the Synchronous SEND step as part of block. This is not working.

Help please??

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

I have decided to go with alerts since there is no way to capture the error text of exception and send as an email. Thanks Mario, Carlos and Peter for your help. I have awarded points for you all.

Thanks

Sam

Former Member
0 Kudos

Hello Samuel,

Just to close this thread and finish up my own search, where I met your discussion, here I'm quoting two experts of this forum:

"you cannot catch the exception's value in the XI "

(see posting from Michal Krawczyk, Jun 12, 2006, in thread )

"The content of a fault message are not accessible inside a BPM."

(see posting from Bhavesh Kantilal, Oct 3, 2007, in thread )

Regards,

Dennis

Former Member
0 Kudos

Hi samuel,

in BPM your send step, that calls the RFC has to be within a block. In this block create a (system~) exception branch (by click right mouse).

In the RFC-send step assign in the propeties the (system~) exception.

Thats all.

Now if the RFC fails, the process steps into the exception branch. In the exception branch, define your further steps (For e.g. mailing to an agent)

Regards Mario

Former Member
0 Kudos

Hi Mario,

do you know about a solution, how to make your suggestion work? Have you seen it working somewhere?

Peter

Former Member
0 Kudos

In the payload i get an error like below:

<SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: RfcAdapter: receiver channel has static errors: can not instantiate RfcPool caused by: com.sap.aii.af.rfc.RfcAdapterException: error initializing RfcClientPool:com.sap.aii.af.rfc.core.repository.RfcRepositoryException: can not connect to destination system due to: com.sap.mw.jco.JCO$Exception: (103) RFC_ERROR_LOGON_FAILURE: Name or password is incorrect (repeat logon)</SAP:AdditionalText>

I know the solution to rectify this error.

What i would like to know though is how to capture the above error text. Bcos i have to send the exception text as an email. I am putting a send step inside the exception branch and sending it to mail adapter. BUT I AM UNABLE TO CAPTURE THE TEXT. How to capture the text?

Former Member
0 Kudos

By the way THANKZ Mario, Carlos and Peter for your instant reply

iprieto
Contributor
0 Kudos

Check this pages:

http://help.sap.com/saphelp_nw04/helpdata/en/d0/d4b54020c6792ae10000000a155106/content.htm

/people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function

Best regards

Iván

Edited by: Carlos Ivan Prieto Rubio on Jan 22, 2008 12:10 PM

Former Member
0 Kudos

Carlos

I read the threads which you mentioned. But it uses ALERTS. Is there a way to capture error text of the exception message WITHOUT USING ALERTS. Also i don't have access to ABAP development.

Thanks for your instant replies once again.

Sam

Former Member
0 Kudos

This is what I was writing about.. I haven't seen it working yet.

For example - what data type to use (in the send step)? How structured to be able to capture the text? etc... I'm very curious, if it can be achieved..

Peter

Former Member
0 Kudos

Peter

You are right. I tried all combinations and it is only throwing error. However if i try to use the source variable in the send step of exception branch it works well. But we can't capture the text of error response of RFC. Gurus anybody have done this and SEEN WORKING in real environment??

Former Member
0 Kudos

Hi Samuel!

Well, i think, there is a lot of threads, where people try to write exceptions from the exception branch in some logs (file) or sending them in other way (let's say - e-mail), but since I know, nobody was successful. I think, you can only throw this error as alert. If you find out, how to achieve it, let me please know.

Thanks, Peter

iprieto
Contributor
0 Kudos

Hi,

Check Communicaton channels parameters.

Regards

Ivá

Former Member
0 Kudos

I have checked and everything appears correct. Actually i want to know the steps involved in raising the exception?? Can you please help?

iprieto
Contributor
0 Kudos

Try to check in Runtime Workbench-> Adapter Engine -> Communicaction Channel monitoring and check if communication channel appears in red status. Perphaps the gateway parameters is wrong.

On the other hand, try to increase the communication channel RFC the parameter connections to 5 or 10 .

Regards Iván

Edited by: Carlos Ivan Prieto Rubio on Jan 22, 2008 11:26 AM