Create Fail-Safe Composite Applications by Implementing Foolproof Error-Handling Mechanisms in SAP MII

  • by Abesh Bhattacharjee, Senior Solution Architect, Fujitsu America Inc.
  • March 27, 2015
Discover how to handle various error scenarios while developing composite applications in SAP Manufacturing Integration and Intelligence (SAP MII). Learn the new exception handling and transaction handling techniques in SAP MII.
Learning Objectives

After reading this article, you’ll know how to:

  • Create fail-safe Business Logic Services (BLS) transactions
  • Debug BLS transactions with the SAP Manufacturing Integration and Intelligence (MII) debugger
  • Monitor the performance of BLS transactions
Key Concept
Exception handling and SQL transaction support are two techniques that are part of the newer versions of SAP Manufacturing Integration and Intelligence (MII). You can use these techniques not only to handle errors but also to make sure that your business logic or transaction is fail-safe.
While creating any application — whether it is a large-scale, enterprise-wide integration scenario or a small application that runs on a local user’s desktop — developers always tend to focus on the successful implementation of the use case at hand. In other words if all the systems and subsystems work perfectly, as they should, the application should also work as it was designed without any issues.

However, systems sometimes fail. The failure can be because of a simple reason such as a user entering a value in a field of the user interface (UI) that is not in the correct format or a more catastrophic reason, such as the database going down for an unscheduled maintenance. Because an application is generally designed with success scenarios in mind, these exception scenarios, if not handled properly, can lead to the application crashing or not functioning at all because of erroneous or unpredictable behavior on the part of the application. Therefore, error handling is an important part of any application design. The developer or architect needs to identify points and types of failures and trap them when they occur.

Evolution of Error-Handling Mechanisms in SAP MII

The two most common use cases for SAP Manufacturing Integration and Intelligence (SAP MII) are integration scenarios and UI development. In both of these use cases, proper error handling is of the utmost importance. For example, for an interface transferring data across multiple disparate systems, it is necessary to log data that fails to transfer over from one system to another so that this data can be reviewed, errors can be corrected, and this data can be transferred again to the target system. With regard to UIs, proper error handling can ensure a better user experience by providing informative messages if the user incorrectly inputs data that causes the system to fail to process the data.

Designing fail-safe SAP MII transactions and applications has often been a challenge to MII developers. Prior to SAP MII 12.1, the only way to check if there was an exception in an SAP MII Business Logic Services (BLS) transaction was to add conditional action blocks and check whether the previous action succeeded. Logic could then be executed or bypassed on the basis of the success of the previous check. However, not every scenario can be handled just with conditional action blocks. For example, a logic error such as division by zero can occur anywhere and may cause the transaction to terminate prematurely if assigned to a link of an action block.

Note
At various points in this article, I refer to versions in which a certain technique or functionality was added to SAP MII. SAP MII 15.0 is the latest version of SAP MII, but some of the features that I describe were introduced in SAP MII versions 12.1, 12.2, or 14.0.

Abesh Bhattacharjee

Abesh Bhattacharjee is a senior solution architect at Fujitsu America Inc. He has more than 12 years of experience in IT, with more than nine years in SAP manufacturing specializing in SAP Manufacturing Integration and Intelligence (SAP MII). He is the coauthor of the first ever book on SAP MII: Implementing and Configuring SAP MII and is recognized as a hands-on expert in SAP MII.

Abesh has a successful and proven track record of developing and managing top-class teams who are best in the business, developing solution assets, defining solution architectures, conducting blueprinting workshops, creating technical designs, delivering comprehensive technical training sessions, and leading various implementation projects globally. He was an active SAP Mentor from 2008 to 2014.

See more by this author


Comments

No comments have been submitted on this article. 


Please log in to post a comment.

To learn more about subscription access to premium content, click here.