Testing Exception Handling

You can test exception handling by using the test tool to deliberately cause an error, for example sending an IDoc with an empty mandatory field.

Prerequisites

You must have completed the required steps in Defining and Using a Basic Type. You must ensure that your source text calls exception handling (or triggers exception handling in ALE inbound processing using the workflow return parameters) and sets the status value 51.

Procedure

...

       1.      Choose SAP menu ® Tools ® IDoc Interface/ALE ® Test Environment ® Test Tools (WE19). Choose Existing IDoc as the template for the test and enter the number of an inbound IDoc, which has status 53.

       2.      Choose .

       3.      Use the mouse to click on one of the mandatory segments and delete the contents of the segment.

       4.      Choose Standard inbox. Your IDoc should be assigned error status 51 (you can check using the IDoc Display function).

       5.      If you are entered as a possible agent for your task and as a permitted agent in the inbound partner profiles, a work item is sent to your Business Workplace and can be executed from there. You can go to the Business Workplace, for example, from the initial menu via Menu ® Business Workplace.

In the example, you should delete the value from the segment field E1HEAD-VKORG. As a result, an error occurs during inbound processing in the FORM routine CALL_VA01_IDOC_ORDERS (no sales organization entered). As a recipient, a work item is sent to your Business Workplace.