Hi I am trying to implement a routine in SAP to create a Sales Order. I can get it to work using basic keystroke recording. However when trying to identify the elements to use in a “type into” activity, I find that the identified anchor, is mis-aligned to the actual item on screen. In the screen shot attached I want to type into the RED box, for the order type. However the UiPath element that will actually populate this is shown in the green box! This makes for a slow and tedious process in trying to determine by trial and error the correct element for each field. I am using Studio 2021.2. I have tried changing the screen resolution on my monitor but that doesn’t seem to make a difference.
Any ideas how I can resolve this alignment issue.
Welcome back to our UiPath community.
Did you enable SAP script ?
Yes scripting is activated and working. I have had this checked. UiPath reads everything ok, and I can see the information in the UI Explorer etc being populated. Its just the visual alignment on screen that is the issue. I can spend the time working through all of the elements in UI Explorer to find the right ones to enter data into, but it is some much slower and cumbersome than using the point and click functionality as its designed to be used.
Can you search Type Into activity in Activity panel and share screenshot of it. Need to check once which Type Into activity are you using here.
Here you go. here is the type into I am using. It is when I select the “Indicate Target on screen” then go to the indicate it on SAP, the green box’s don’t line up with the actual fields.
Is it possible for you to “catch” the field with the UI Explorer?
If it is possible, as workaround, copy the wnd app attribute to window selector and sap app into the fuzzy an selector input fields manually. Choose the target and the targeting methods.
<wnd app='saplogon.exe' cls='SAP_FRONTEND_SESSION' title='Create Sales Order: Initial Screen' />
<sap id='usr/ctxtVBAK-AUART' />
Not elegant but at least you would get ahead.
If it is not possible try the attributes from here, just to know if it works.
Let us know your results.
Yes I have been starting to use the fields in the UI Explorer, (starting to get quicker at what I am looking for and getting the right fields.) Interestingly I found for a couple of fields I still had to offset the cursor even when naming the field!
thanks for the pointers
does the setting of the fields work with the SAP GUI scripting via VBScript?
If Not IsObject(application) Then
Set SapGuiAuto = GetObject("SAPGUI")
Set application = SapGuiAuto.GetScriptingEngine
If Not IsObject(connection) Then
Set connection = application.Children(0)
If Not IsObject(session) Then
Set session = connection.Children(0)
session.findById("wnd/tbar/okcd").text = "/nVA01"
session.findById("wnd/usr/ctxtVBAK-AUART").text = "CS"
Yes the SAP Gui VBA script above works fine.
as far as I can say all looks good. Sadly I have no idea what could be the reasons for this behavior.
All good, thanks for your input.
Let me ask you two questions and with high probability I will know the EXACT answer to your issue.
- Are you using SAP WinGUI 7.70 ?
- Do you have more than 1 monitor?
Looking forward to hearing from you
Best regards, Lev
Yes to both. (Laptop + 2 monitors)
Then it is all super clear.
The root cause is that SAP has introduced Multi Monitor Scaling support :(( It has nothing to do with UiPath.
There are a plenty of issues with SAP WInGUI 7.70 und Multi scaling, feel free to check it our here: https://launchpad.support.sap.com/#/notes/2985351
In your case the solution would be
- Close all SAP windows incl. SAP Logon itself
- Set the DPI scaling of ALL your monitors to 100% (means, no scaling) in Windows display setting.
- Restart SAP WinGUI
So, the monitor scaling would be set to 100%, then automation and identification will work 100%
Best regards, Lev
Thanks. that’s solved it. Had my laptop at 150%, and my monitors at 100%.
So much easier now!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.