cancel
Showing results for 
Search instead for 
Did you mean: 

How to use an ABAP exception as a web service fault

Former Member
0 Kudos

Hi experts,

I have created a web service out of an ABAP function module, using the SAP standard wizard for web services. The ABAP function has some exceptions defined. Now the question is: How can I "translate" these ABAP function exceptions to web service faults?

In the WSDL file I can see that the web service defines the faults, but they are not part of the web service operation (in the WSDL file). So when I load the definition into JDeveloper, the faults are not recognized.

Any ideas what I am missing here?

Thanks in advance!

Kind regards, Matthias

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

SAP bug, see SAP note 1270688

Former Member
0 Kudos

Exceptions from SAP function module are not translated as web service fault message, this is a standard behaviour due among other to the fact that exceptions are not "in line" with the definition a web service fault message.

Usually when you want to use a standard SAP function module and expose it as web service, you need to "wrap-it" into a new Z function module.

In that new function module you must capture the exceptions and convert them into a web service fault message structure (usually containing error type, text and number)

Karim