Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
sergey_korolev
Active Contributor
0 Kudos

It turns out that default Result checker for MBOs and their operations which contact SAP backend supports only those SAP BAPI's whose RETURN parameter is based on BAPIRET2 structure. But actually lots of usable BAPIs use old style RETURN referencing BAPIRETURN structure. The default result checker for such BAPI's always throws an exception "field NUMBER not found" or with similar text.

You can always avoid the exception by selecting "None" in Result checker properties. But I think it is better to have one as the properly written checker can help in troubleshooting.

Another consideration is that sometimes you don't need throwing an exception in case of error message in BAPI return parameter: for example, some BAPIs (such as various GetList methods) return error when nothing found.

I wrote a convenience class BAPIResultChecker.java which encapsulates methods for checking both BAPIRETURN and BAPIRET2 structures. It contains several overloaded functionResultCheck method implementations you can use in different situations (javadoc available). Also two demo Result Checker classes are available: BAPIRETURNChecker and BAPIRETURNCheckerWithException which can be used as templates for your own checkers. Source code is available at Code Exchange: (SVN link).

1 Comment
Labels in this area