cancel
Showing results for 
Search instead for 
Did you mean: 

Blueprism is gettin stuck within an application

MarcoMatuttis1
Level 6

I have a small problem with blueprism excel and sap.

I try to export a table from sap to excel. I use the SAP MENU ITEM Action for this and pass the string "{Liste}{Exportieren}{Tabellenkalkulation...}" to that action.

Which is the equivalent of this:

19359.png

I did not include the table because of privacy reasons but thats what I basically do in SAP. After Selecting that the "Save as window" pops up:

19360.png

And then blueprism is stuck in this Navigate Stage until I manually click the Speichern Button:

19361.png

19362.png

I already clicked the complete thing manually and spied the "Save as" Window and the filename text are and the "Speichern" Button with the application modeller. But even when I add a click action to the Navigate Stage, the process stays stuck in Step 1 in the Navigate Stage.

Anyony got an Idea how to fix or work around that ?



------------------------------
Marco Matuttis
Robot Process Automation Developer
INTER Krankenversicherung AG
Mannheim
------------------------------
5 REPLIES 5

Hi @MarcoMatuttis1

The issue you have is common when working with SAP where the navigate action you performed then opens a new window but the navigate action isnt released where you can then interact with the new window. There are a couple of different options you can try:

1. Spy the elements to select to open the upload window using a different spy method, AA or UI
2. Find out if there is a key stroke you can use instead of the click actions e.g. F8, F4 etc
3. Create a custom SAP script to replace the click actions and then when the new window appears you can use BP actions to interact with it and complete the upload. To do this select the small computer screen in sap (highlighted in the image below). The select Start recording, when the record window shows just select where you want the script to be saved and then click the record button. YOu can then do the actions you need to do and when done stop the recording and the script will be saved. You can add this to a code stage in blueprism but you need to add in the below code first then the code you saved. 


19322.jpg
Add in the following code to a code stage in BP. Then add in your recorded script underneath it.
Dim SapGuiAuto as object
Dim SapApp as object
Dim SapCon as object
Dim session as object
 
SapGuiAuto = Microsoft.VisualBasic.Interaction.GetObject("SAPGUI")'Get the SAP Scripting object
SapApp = SapGuiAuto.GetScriptingEngine 'Get The currently running SAp GUI
SapCon = SapApp.Children(0) ' Get the first system that is currently connected
session = SapCon.Children(0) 'Get the first session (window) on that connection


------------------------------
Michael ONeil
Technical Lead developer
NTTData
Europe/London
------------------------------

Well I can spy the Window with UIA and AA but blueprism does not continue to the next step within the navigate stage. I try to solve it differently now with completely moving mouse and clicking all the menu items. If this does not work I will try you codestage. Thanks for you advice

------------------------------
Marco Matuttis
Robot Process Automation Developer
INTER Krankenversicherung AG
Mannheim
------------------------------

Unfortunately spying SAP with UIA mode did not work, since I was not able the spy the menu bar and their elements as single items. It was basically the same outcome that I have to select a menu item like mentioned in the opening post: "{Liste}{Exportieren}{Tabellenkalkulation...}"

But I managed to get it done with activate application and Global Send Keys {ALT}{L}{A}{E} ... Not my favourite way of doing things with blueprism but it works and seems realiable & stable.



------------------------------
Marco Matuttis
Robot Process Automation Developer
INTER Krankenversicherung AG
Mannheim
------------------------------

Hi @MarcoMatuttis1,

You can utilize code stage for performing the task as code stage is much reliable and faster solution whenever dealing with SAP system. There will be various places where SAP spying mode won't work and SAP scripting (or code stage) will work like magic.​

------------------------------
Ritansh Jatwani
Manager
Deloitte
Gurgaon
*If you find this post helpful mark it as best answer
------------------------------

Hi @MarcoMatuttis1,

We have observed the same issue while continuously exporting the data from SAP in unattended mode. Due to this issue, Bot stuck in not responding stage until we close the SAP application manually. After restarting the SAP application, issue automatically gets resolved and again it starts exporting the files. We faced this issue, after every 5-7 file export. 

We have used below work arounds to handle this issue - 

1. Detach the SAP application and re-attach it before performing SAP export steps.

2.   If BP stuck into not responding state and to bring back BP in responding state. We have used below application modeler configuration - 
  a) Open Application Modeler, click on application wizard and  scroll down to "Select the Application Manager Mode".
  b) Use "External, Blue Prism address size"  and provide the wait time. After the provided time, BP will throw an exception and which we will be bubble up to the process and in the recovery block restart the application and again perform the export steps.

19353.png






------------------------------
KirtiMaan Talwar
------------------------------
KirtiMaan Talwar
IA Consultant
Deloitte USI