‎2008 May 21 7:55 PM
‎2008 May 21 7:58 PM
Hello,
See these: and [How To Catch Exceptions When Using BAPI Callable Objects|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3795] [original link is broken] [original link is broken] [original link is broken];.
Regards,
If usefull please rewards.
‎2008 May 21 8:27 PM
when you are creating your own 'BAPI', you should not maintain the exceptions, but use the return table (structure BAPIRET2), to 'catch' all messages generated by the BAPI and send it back to the calling application.
However, what you should do is add two standard exceptions when calling the BAPI for catching communication failures and system failures (short dumps for example) in the calling system. Just copy and paste this behind the BAPI when calling it:
EXCEPTIONS
system_failure = 1 MESSAGE return_message
communication_failure = 2 MESSAGE return_message
OTHERS.
return_message can be defined as type c length 255.
[using predefined exceptions for RFC|http://help.sap.com/saphelp_nw70/helpdata/EN/22/0425e0488911d189490000e829fbbd/content.htm]
Edited by: Micky Oestreich on May 21, 2008 9:28 PM