Hi! I am trying to automate SAP GUI report extraction process but some of the reports are huge and takes >15 mins to load (15mins before anything shows up on the SAP GUI status bar. meanwhile i could only see the bar keeps running on the top of the screen). i would like to terminate the job and move on to the next extraction request if any report takes >1 minute (for testing purpose) to finish running.
I used a SAP Select Menu Item activity > Execute and set the timeout property of this to 60000ms but it did not terminate the job after a min. – SS1
i have also tried putting ‘read status bar’ activity inside a do while for it to loop for a minute before termination but it didnt work either. --SS2
Step 1 : After you select the menu item in SAP, add the delay activity.
Step 2 : Read or verify the status bar using classic activities like images exists or element exists and configure that to verify execution is still going on, element or Image exists return a boolean variable.
True : Still Executing
False : Execution completed.
Step 3 : use an if condition with the boolean variable returned from above step as condition,
Then : Transaction is still Executing,
Kill the execution using click or by passing hot keys.
Else : Transaction loaded, next steps.
Hope this helps you solve the challenge you are facing.
Delay activity is what i suggested instead of time out.
To illustrate lets say you are using a click activity with time out configured the functionality of time out is to wait for the mentioned time before throwing exception if click is not successful.
Whereas delay will help you wait post the click if you add seperately.
Also if the bot seems to be freezing thats coz the application you are interacting with is actively executing.
Try using a parallel container, in left half keep the menu item selection and in the right half add a delay and the rest steps suggested in the first post this would help you out.
Since you would be making use of parallel activity consider adding some 20 or more seconds so that click is executed and 1 min wait time is there.
You can use the Element exists to check if the report is completed in one min or not, This element could be something that indicates the completion of the report extraction process.
Use the “Delay” activity to add delay of 1 min before this element exists. The output of element exists we can use it in if condition, if not exists we can terminate the execution as follows.
By using this technique it will not kill your whole SAP session.
thanks for your help.
I’m using a for each row and i dont want the bot to wait through the delay for every row.
instead, i would like the bot to look for the element > log message > if exists then move to the next step else loop back to look for the element. this looping to look for the element should not exceed 10mins (for example) > if element do not exist after 10mins, send error message.