SAP Error Handling

I am automating the SAP Sales Order entry process.

I have the process well defined.
Now, at any point an exception can occur. I have kept try catch block.

I have to create a group of Sales Orders. Lets suppose I encounter an exception while creating second Sales Order, how do I handle the exception, and continue with creating the third Sales Order?


I am new to UIPath & trying to automate Sales Order entry also - please could you share you solution with me? I’d be interested to know how you dealt with this.


Hi, I also have same issue. Hope you can share the solution. Thank you

This is what the REFramework is for.

  1. in the main workflow you define an index (that starts at 0) that is used in “Get Transaction Data” to decide which sales order to process, the output of “Get transaction data” will be the current sales order e.g. 3rd sales order
  2. your main try catch block will be in “Process” block, here you process the current sales order that is output by “Get transaction data”

3. in this try catch block you must assign businessRuleException/System exception to two variables respectively, then pass these variables to the “SetTransactionStatus” in the “Finally” block

4. in SetTransactionStatus, it will increment the counter depending on whether its a business or system exception or no exception
a) business exception - increment counter since it doesnt matter how many times you retry
b) system exception - increment (if current retry > max retry), else dont increment (i.e. retry the same case)
c) no exception - increment

Example flow
1.index = 3, get transaction data will get 3rd sales order, pass it to “Process” sequence
2. process sequence will process 3rd sales order
3. Exception occurred, robot will call “Set Transaction Status”
4. index will increment to 4 or stay at 3 depending on the nature of the exception