lapa

New Member
Hi, all!

I am automating SAP processes using Blue Prism.

Some scripts I am making require interaction with SAP's top menu. The top menu bar of SAP that often displays options such as Menu, Settings, Edit, etc. (shown in picture).

View attachment 1543939590030.png

For some scripts I can get away with using F-commands, but some scripts do not have the option to do that. Does anyone know how to interact with these elements? They cannot be spied in SAP mode, and I would like to avoid having to use X/Y coordinates to select these elements.

I have been trying to manipulate them using Global Send Keys, setting the Global Send Keys text field to the values I want to select, ex. "Edit", but I have had no luck.

Any insight would be greatly appreciated. Thanks!
 

Attachments

  • SAP Top Menu highlighted.PNG
    5.4 KB · Views: 100

Jan Čech

New Member
Hi,

try combination of Global Send Keys for selecting and open 1st level of menu -> Global Send Key for that is ALT+'underlined letter in name of Menu value' then some of fields can be chosen by another Global Send Keys and the next ones can by spied in accesibility mode.

In process you have to use Navigate stage with the multiple actions with following order:
1. Activate SAP window
2. Send Global Keys ALT+ ....
3. Press spied element of submenu filed in AA mode

I also recomend to use time pauses 0,1s between each step.

If I have more time, I can sen you a screen.
 

lapa

New Member
Ah thank you so much!

Do you think that I would be able to use the "see if exists" functionality of wait on this? If possible, would like to avoid directly entering a pause time value.
 

Jan Čech

New Member
I think both ways are possible to use. You can set pause time values between steps in Navigate stage OR you can divide one stage in to two Navigate stages and between them paste waitstage "see if exists" "spied element of submenu"

in process:
1st Navigate stage:
1. Activate SAP window
2. Send Global Keys ALT+ ....
then
Waite stage on "spied element of submenu"
then
2nd Navigate stage:
3. Press spied element of submenu filed in AA mode

!! But, I dont use this, because ofdebugigig in step by step mode -> You can´t go step by step, because after running 1st Navigate stage, you need to click in BP on "next" -> so opened 1st lvl of SAP Menu will disapper -> so wait stage and 2nd navigate stage will not work. Only posibility is to run all 3 stages together in one batch.
 

arun_pmss

New Member
Apart from the ways that are already put in here, you can always go with Surface Automation when rest of the things fail.

You can also use SAP recorder to give the code for you and use that code in a code stage to get things done.
 

KarolTheGuy

New Member
I can't figure out how to use that recording VBS code in a code stage. What do I have to setup in initialize of my object to I have to put?

Edit: I just found we have to add the below code in the code stage just before the recorded bits.
Dim App, SapGuiAuto, Connection, session As Object
SapGuiAuto = GetObject("SAPGUI")
App = SapGuiAuto.GetScriptingEngine
Connection = App.Children(0)
session = Connection.Children(0)
 
Last edited:
Top