cancel
Showing results for 
Search instead for 
Did you mean: 

How to Handle Exceptions from the Base function module for Web service?.

Neslinn
Participant
0 Kudos

Hi,

I have written a BAPI within the MAIN function module for Asset creation. Suppose if the asset is not created due to some invalid data i dont want to use the BAPIRET2 structure for Exception handling, but i want to capture on the MAIN function module EXCEPTIONS.

Note: EvenIf the BAPI fails the sy-subrc is 0.

Please suggest.

Regards,

Neslin.

Message was edited by:

neslin

Accepted Solutions (1)

Accepted Solutions (1)

sbhutani1
Contributor
0 Kudos

Hi Neslin,

For all of your queries related to webservice exception handling, i think this is the best answer i found. Please refer to this nicely written blog by Andre Fischer.

/people/andre.fischer/blog/2007/02/07/exception-handling-for-web-services-based-on-business-apis-bapi-using-visual-studio-2005

Hope this will help you.

Regards

Sumit Bhutani

Neslinn
Participant
0 Kudos

Hi Sumit,

In the blog it is using the BAPIRET2 .

neslin.

Former Member
0 Kudos

One possibility is - You may check out the standard table, if it has been updated and set out the flag accordingly.

Hope this helps,

- anto.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

The following article talks abt exception handling in web services exposed from an R/3 system.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/esa/exception%20ha...

Regards

Pushkar