SAP® Business Workflow

Exception Handling in SAP® Business Workflow

Contd..

As mentioned earlier, Blocks can handle exceptions. If an exception is caught, everything inside the block is cancelled. If exception is not caught, process is set to an ERROR state (This could be compared to TRY-CATCH in ABAPTM programs. If the exception is not caught, program results in dump)

  • Create a new workflow and define a new step “Block” as mentioned earlier page.
  • In the “Block” step, click on the tab “Exceptions” and make an entry of a new exception, for e.g., “Dummy_Excep”, which would be raised in the workflow definition.

   

  • Activate the exception defined above, by clicking on the button left to the exception name
  • Go back to the main screen. Two branches would be appearing between the block begin and block end, as shown below. Exception branch is taken whenever the exception, Dummy_Excep, is triggered.

         

  • Exceptions are triggered using the step “Process Control”. Define a new step “Process Control” in the normal branch. Enter the step name and the outcome name. Select “Throw Exception” in the function. In the event name, select the exception name defined earlier (see the screenshot below).
  • Uncheck “Step not in workflow log” if you would like to see this step in the workflow log.
  • Define a mail step in the exception branch of the block (for testing purpose – to ensure that this exception branch is taken, when the exception is triggered). The execution flow of the exception handling is shown below:

   

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image