Skip to main content
Solved

SAP Failure Pop-up Appears and RPA Freezes

  • January 30, 2025
  • 8 replies
  • 97 views

bruhfl
Forum|alt.badge.img+1

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.

Best answer by Aaron.Gleason

@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.

View original
Did this topic help answer your question?

8 replies

Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+10
  • Automation Anywhere Team
  • 560 replies
  • January 30, 2025

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. 


bruhfl
Forum|alt.badge.img+1
  • Author
  • Cadet | Tier 2
  • 3 replies
  • January 31, 2025

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.


Shreya.Kumar
Pathfinder Community Team
Forum|alt.badge.img+9
  • Pathfinder Community Team
  • 97 replies
  • January 31, 2025

@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?


bruhfl
Forum|alt.badge.img+1
  • Author
  • Cadet | Tier 2
  • 3 replies
  • January 31, 2025

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.

 


Forum|alt.badge.img+8
  • Navigator | Tier 3
  • 60 replies
  • January 31, 2025

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.


Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+10
  • Automation Anywhere Team
  • 560 replies
  • Answer
  • January 31, 2025

@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.


Forum|alt.badge.img+8
  • Navigator | Tier 3
  • 60 replies
  • January 31, 2025
Aaron.Gleason wrote:

@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.


bruhfl
Forum|alt.badge.img+1
  • Author
  • Cadet | Tier 2
  • 3 replies
  • February 3, 2025

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings