Skip to Content

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).

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply