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.
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.
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.
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.
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!
Hello Murray,
does the setting of the fields work with the SAP GUI scripting via VBScript?
Best regards
Stefan
If Not IsObject(application) Then
Set SapGuiAuto = GetObject("SAPGUI")
Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
Set connection = application.Children(0)
End If
If Not IsObject(session) Then
Set session = connection.Children(0)
End If
session.findById("wnd[0]/tbar[0]/okcd").text = "/nVA01"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/ctxtVBAK-AUART").text = "CS"
session.findById("wnd[0]").sendVKey 0