cancel
Showing results for 
Search instead for 
Did you mean: 

How to Throw an Exception in a SapServer

Former Member
0 Kudos

Hello,

We have successfully implemented SAPServer in our external process.

The only thinks that doesn't work perfectly is that we can't throw an exception in the implementation of remote function module.

The ABAP Program that is calling our fontion waits on expetion 0, 1, 2, 3 and 4. But when we throw the exception like this : throw new RfcException( "Error" );

the ABAP catch this exception, but as exception 4 (others) and not as 3 (Error)

Can someone help. Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello

Thanks for the answer.

In the while we tried the following:

RfcAbapException( "ERROR" );

but it doesn't work.

The solution was to call this method with 2 parameters:

RfcAbapException( "ERROR", "Some error text...");

And now OK.

Answers (1)

Answers (1)

reiner_hille-doering
Active Contributor
0 Kudos

Try RfcAbapException .