Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI

Former Member
0 Kudos
146

Hi all,

I have a doubt regarding BAPI.. Can't we use Exceptions to throw error in BAPI like normal function modules?

Thanks

Kelly

1 ACCEPTED SOLUTION

Former Member
0 Kudos
104

Hello Kelly,

I'm sure that you know exceptions are a way of handling errors. This <a href="http://help.sap.com/saphelp_webas620/helpdata/en/a5/3ec9f74ac011d1894e0000e829fbbd/content.htm">link</a> in the SAP Documentation explains the Error Handling mechanism for the BAPIs.

I hope you will be able to see why you should not have exceptions in the BAPI interface.

Regards,

Anand Mandalika.

4 REPLIES 4

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
104

BAPIs usually handle exceptions thru the RETURN parameter usually found under the EXPORTING or TABLES parameters.

Regards,

Rich Heilman

Former Member
0 Kudos
104

By design, BAPIs are supposed to be used by external application that may or may not be able to handle exceptions raised in the calls. That is the reason why all the errors are collected into the messages table and then the calling application can decide how to handle the errors based on its capabilities and limitations.

Hope this helps,

Srinivas

Former Member
0 Kudos
105

Hello Kelly,

I'm sure that you know exceptions are a way of handling errors. This <a href="http://help.sap.com/saphelp_webas620/helpdata/en/a5/3ec9f74ac011d1894e0000e829fbbd/content.htm">link</a> in the SAP Documentation explains the Error Handling mechanism for the BAPIs.

I hope you will be able to see why you should not have exceptions in the BAPI interface.

Regards,

Anand Mandalika.

0 Kudos
104

Hi All,

Thanks to everybody .. And that link was a great help...

Thanks again...

Kelly