Questions tagged [sap-gui]

Questions about SAP GUI, SAP GUI Scripting, using SAP GUI (Calling transactions, setting up in the environment, customizing, etc.)

"SAP Graphical User Interface" (SAP GUI) is a legacy SAP front end tool available for various desktop environments (Windows, Mac, Java) and as an HTML web application.

It also comes with SAP GUI Scripting, an API that allows users to automate repetitive tasks by recording and running macro-like scripts (VBS and others for Windows, JavaScript for Java).

720 questions
0
votes
2 answers

How to get user ID from an open SAP GUI session?

I need to get the user ID into VBA code. Like on the picture: I tried UserId = Session.FindById("wnd[0]").User But it failed. What's the right way?
Sergey Belousov
  • 153
  • 2
  • 12
0
votes
1 answer

How to stay in the same login with SAP Connection?

I am trying to automate some SAP Data reports, I am using Visual Basic 2017 and SAP Logon 750, all works fine so far but if there's an open connection then a pop up shows with message: User XXXXX is already logged on How can I choose radio button…
user3412266
  • 71
  • 1
  • 3
  • 8
0
votes
0 answers

Getting InnerText from HTMLElement of WebBrowser using Python and Pywin

I'm trying to get InnerText property of HTMLElement of already opened WebBrowser (from SAP GUI Scripting GuiHTMLViewer object > BrowserHandle > Document) using pywin (win32com) lib on Python. I got a WebBrowser, which have Document property (object…
0
votes
1 answer

SAP GUI script for information window

I need to get this window to click on the continue button if it pops out when no data is changed and continue with the next cell
Harvint Raj
  • 69
  • 1
  • 11
0
votes
1 answer

For loop not capturing all values in SAP GUI

new to SAP but have done some VBA programming. I need to automate some things in SAP GUI using Excel VBA but I am starting with baby steps and getting stumped. All I want to do is copy data from a column in SAP GUI (table already open) into an…
0
votes
1 answer

Select an item by name instead of id in VBS

I have recorded a script on SAP that runs on CITRIX. Everything worked fine until some items were added to the window that the right item was selected to filter the columns. I guess the reason is that the proper item (e.g. MATART in the shown…
Ibo
  • 4,081
  • 6
  • 45
  • 65
0
votes
1 answer

Running two VBA subs using call method

I have written/recorded two separate macros, one that goes into SAP to download some information, and another that then takes the downloaded information and pulls/formats it into my original spreadsheet. Both macros run perfectly by themselves. The…
DiYage
  • 33
  • 4
0
votes
2 answers

SAP fails on 2nd iteration of loop: the control could not be found by id

Problem: The 2nd loop of For j fails on the line of code where I "Test for which line accrual is on 66-71" Amt = session.FindById("wnd[0]/usr/lbl[" & CStr(g) & ",11]").Text This was working a few weeks ago but my IT and our SAP consultant advise…
alowflyingpig
  • 730
  • 7
  • 18
0
votes
2 answers

delay SAP GUI until dialog window open

I need to use Application.Wait Now + [some time value] between commands. But sometimes it doesn't work, when SAP working too slow. How to do it? I need some Loop with Application.Wait when each dialog windows showing up. This is my VBA code: Sub…
Karol
  • 91
  • 11
0
votes
1 answer

How to construct a selector based on dynamic ctrlid through UiPath?

This question have a reference to the following questions: UiPath -Error {“message”:"Click Text 'SAPTreeList': Cannot find the UI element corresponding to this selector: Why does the ctrlid format detected by UiPath differs from the documented…
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
0
votes
2 answers

CK13N transaction read text from GuiTree table fields using VBA

I'm looking for a solution how to read text from SAP table. I can select specific cell in table, but don't know the reference to get its text value. Below code works fine but what I need is instead of selectItem I need to get text from this…
Sphinx
  • 628
  • 7
  • 15
0
votes
1 answer

Code doesn't "wait" until Workbook opens to proceed

I have a VBA code that mixes SAP GUI Scripting and VBA. Basically I use a SAP transaction and I export it as a Excel sheet, after I click the export button it asks for a place to save. I have recorded the script using SAP and inserted it into…
0
votes
2 answers

SAP Tree GetAbapImage returns same value for different icons, how to solve?

I have 3 types of different icons that represent status of the record. I need to programmatically (using SAP Scripting) read rows and understand their statuses: The issue that method GetAbapImage(key, name) returns the same value @5 for both Error…
AndrewG10i
  • 661
  • 1
  • 6
  • 21
0
votes
0 answers

Not able to extract SAP Data into .xlsx format

I am trying to extract data from FB04 T-Code from SAP, but I am not able to extract data to .xlsx format. my code fails at extracting data and getting error as "The control could not be be found by id.", kindly assist where i am going wrong. Sub…
nikhil nik
  • 53
  • 1
  • 10
0
votes
1 answer

is there any function that I can simulate the enter button on sapgui?

I have my GuiSession. that data is saved only with the enter button pressed. then I would like to know if there is any function that I accept to send the button command. without having to emulate. because the window will not always be in focus. im…