cancel
Showing results for 
Search instead for 
Did you mean: 

DOTNET RFC-Server: Throwing ABAP-exceptions

Former Member
0 Kudos

Dear all,

how do I throw ABAP-exceptions in a generated RFC-server?

When I have an RFC-function module like the attached one in an SAP system and generate a server for this function module, how can I throw the ABAP-exception WRONG_UUID (for example in the C# code attached)?

I haven't found an rfc-server example dealing with ABAP-exceptions.

Best regards,

Willy

FUNCTION ZZZ.

*"----


""Local interface:

*" IMPORTING

*" VALUE(UUID) TYPE SYSUUID_C DEFAULT SPACE

*" EXCEPTIONS

*" WRONG_UUID

*"----


// Implementation of remote function module ZZZ

protected override void Zzz (

string Uuid)

{

// TODO: add your server code here

}

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Willy

If I am not mistaken, it should be ...

{

RfcAbapException ns = new RfcAbapException("WRONG_UUID", " Wrong user Id");

throw ns;

}

Not a C# guru but it should be something like that.

Former Member
0 Kudos

Hi Khoon,

why is it that damn'd simple :-).

It works!

Thank you,

Willy

Answers (0)