cancel
Showing results for 
Search instead for 
Did you mean: 

Exception handling for Web services based BAPIs using Visual Studio

andrefischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Using the Web Service Creation Wizard it is possible to create a Web service for every BAPI. Each BAPI returns status information about its execution in a complex parameter named RETURN in its output message. This parameter returns exception messages or success messages to the calling program. When published as a Web service the return parameter can be retrieved from a .NET Web service client. In my blog I would like to introduce a set of C# classes that can be used to check the different return parameters of such a Web service for BAPI errors. If the return parameter contains an error messages this error is thrown as a .NET exception. The classes reside in their own namespace and can easily be added to any existing project.

The code can be downloaded from the .Code Snippet Gallery .

Best regards,

André

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Thanks for the nice coding and idea ! I want recomment it for all .NET-Developers to look in the blog and the code snippet gallery !

Do you also translate the code in VB.NET ? Or should I do this ?

Regards

Holger

andrefischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Holger,

I will not translate the coding into VB. So if you want to do this it is OK with me.

An idea would be after some testing by the community to provide the functionality as a DLL. This way it could also easily be added to a VB project.

However I assume that some developers prefer to integrate the coding themselves so that they might add additional customer specific functionlity.

For example not to raise an exception if a specific error is in the return parameter because they want to ignore it.

Best regards,

Andre