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 coding calls exception handling (or triggers exception handling in ALE inbound processing via the workflow return parameters) and sets the status value 51.

Procedure

  1. From the initial node of the IDoc interface choose Test ® Test tool. 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 standard task and as a permitted agent in the inbound partner profiles, a work item is sent to your integrated inbox and can be executed from there. Your inbox can be accessed from the IDoc interface initial node by selecting IDoc ® Inbox.

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 possible and selected agent, a work item is sent to your integrated inbox.