Skip to main content

I am experiencing an issue with bots that interact with SAP using specific SAP actions. Sometimes SAP crashes and displays an error pop-up. The problem is that the RPA does not detect this error automatically; instead, it simply gets stuck in the activity until someone accesses the machine and interacts with the pop-up. Only after this interaction can the RPA terminate with an error.

Is there a way to prevent the RPA from getting stuck in the activity, considering that SAP activities do not have a way to set a timeout?

 

Example of one of the pop-ups that appear and cause the freeze.

In every place where this pop-up could occur, check to see if that window appears. The title of the window, SAP GUI for Windows 770, may stay the same or you may have to use a wildcard it the title changes. 


Hello, Aaron Gleason. The issue is not the pop-up, but rather that the robot gets stuck. For example, when generating a heavy report in SAP using the SAP Click activity, the RPA gets stuck in this activity while waiting for the report to be generated. If an error occurs and a pop-up appears, the RPA remains stuck in the activity and does not proceed with the flow. Only when someone accesses the machine and manually interacts with the pop-up does the RPA get released and continue the flow, but with an error.


@bruhfl thanks for the clarification! Could you provide more details about the error handling in your code? How are you using the try...catch...finally blocks?


I am using the try/catch block, but the issue is not about capturing the error with try/catch. The problem is that the RPA gets stuck in the activity when the SAP pop-up appears and does not proceed until someone accesses the machine and interacts with the pop-up. Only after this interaction does the flow resume, the robot encounters an error, and then it falls into the try/catch.

Based on the example code in the image, the issue usually occurs on line 13. The robot is executing this activity when SAP crashes, causing a pop-up to appear. When the pop-up appears, the robot gets stuck in this activity and does not proceed until someone manually interacts with the pop-up.

 


AA does not have option to run activities in parallel, so you do not have option if your automation does not progresses and has no timeout.


You can use the timeout in the master bot properties(timeout in child bots are not respected when bot runs). This would stop the bot and next scheduled automations can continue.


@bruhfl Your Try/Catch blocks are too big. Put individual ones around the places where the pop-ups *could* happen. Then, in the Catch, check to see if a pop-up appeared. If it did, use a Recorder: Capture to hit the OK button on the pop up and continue.

This is just a logical flow problem with your automation, not a problem with AA and SAP.


@bruhfl Your Try/Catch blocks are too big. Put individual ones around the places where the pop-ups *could* happen. Then, in the Catch, check to see if a pop-up appeared. If it did, use a Recorder: Capture to hit the OK button on the pop up and continue.

This is just a logical flow problem with your automation, not a problem with AA and SAP.

It will never go to catch… that is the problem.


Hello, guys. I changed the try-catch and replaced the SAP click with recording as a left click, and it worked! If the pop-up appears, the robot triggers a timeout error, allowing me to handle the pop-up.


Reply