cancel
Showing results for 
Search instead for 
Did you mean: 

How to catch the error if an RFC fails due to short dump

0 Kudos

Hi All,

I was calling the RFC Function module in parallel processing depends on the number of work processors available. I am getting the return message from the Function module using the perform statement

PERFORMING task_return ON END OF TASK

But I am not able to catch the errors if the RFC has been terminated due to the dump or manually killing the RFC while running.

I need how to handle the RFC if the call has been terminated due to the dump or system failure. Does the RFC return the sy-subrc at this time or can we able to catch the error in any other way.

Thanks & regards,

Vijay

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Vijay,

If you're calling RFC from outside SAP using the OCX-SAPFunctions-Library, then you can catch the dump or any other exception occuring in your SAP-Function.

Assuming that, objRFCFunc is the RFC-Function you can get the Excepetion-Code through objRFCFunc.Exception.

It returns a String. If the error was a dump, the String is "SYSTEM_FAILURE". If it is a "regular" Exception you'll get the Exceptioncode. E.g. "NO_DATA_FOUND".

If you need any sample code e.g. VBA-code for use in Office-Applications, let me know.

regards

Sven