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
1 answer

How to use and loop Excel variables in SAP

I want to make a loop in excel that cycles through cells and sets them as variable and uses that variable in SAP. I have the first variable in cell A46. Sub CustomList() Dim LR As Long, i As Long Range("A46").Select Do j =…
Ternowo
  • 11
  • 1
  • 4
0
votes
1 answer

How to fix in Blue Prism - Exception has been thrown by the target of an invocation

I am trying to automatize SAP with Blue Prism. The thing is that, for now I can write what I want in the fields I have spied (with SAP MODE) in Business Object. When I go to Process Studio and I send the data to the Business Object, it goes fine,…
0
votes
1 answer

How to get file name text from attachment in PR in SAP

I want to get the file name from an attachment inside a Purchase Requisition in SAP using VBA. I have tried already changing the last line for some random numbers bu nothing happened and I can't manage to discover where I can get the file…
Fiinguer
  • 3
  • 2
0
votes
2 answers

VBA to check if SAP GUI button menu entry is enabled

I need Excel to tell me if the button below called "Attachment List" is available to click or not, but I couldn't get it. Below is the code I tried: Sub teste() Set SapGuiAuto = GetObject("SAPGUI") Set SAPApplication =…
Fiinguer
  • 3
  • 2
0
votes
1 answer

How to make a method for that part of SAP-GUI script using Java and JNI?

I have some methods already that I'm using for connecting to SAP GUI Scripting Engine using Java & JACOB library - I'm somehow unable to make one more method I'd like to use. I am using…
0
votes
0 answers

Does anyone know the connection code to log into SAP GUI automated through VBA?

I am having trouble with Windows 10 and my connection code in VBA to automatically open SAP Logon, login for me, and begin the macro. Is there a standard piece of code for Windows 10? I have the code for the older version of Windows, but I keep…
Brian
  • 21
  • 3
0
votes
0 answers

Gettig text out of SAP confirmation Box with vba

I'm automating a process with VBA, and I'm using SAP GUI Scripting to do so. The macro is to create dispute cases and it works fine but I want to know if it's possible to extract a text from a confirmation box when the case is duplicated. I have…
0
votes
2 answers

Run time error '91' when SAP GUI connection is empty

I met error : Run-time error '91' Object Variable or with block variable not set at line session.findById("wnd[0]").maximize below. I searched online, but errors were at different lines. Sub RunScript() Dim session As Object If Not…
rob
  • 17
  • 6
0
votes
1 answer

How to vary the file saving path of an SAP GUI script using VBA?

I have a SAP GUI script that I save in a folder except that I want to vary the path if other people want to use my code except that I don't know how to modify the path. objSess.FindById("wnd[0]").maximize [...] …
dfiu
  • 5
  • 1
  • 5
0
votes
1 answer

How to close SAP pop-up windows with VBA?

I would have liked to have automated several extraction except that when I run the macro I have pop-up windows that annoy me terribly I can make them disappear by pressing enter. Public Sub RunGUIScript() Dim W_Ret As Boolean Dim Société As…
dfiu
  • 5
  • 1
  • 5
0
votes
1 answer

Getting treeId for SAPGuiLibrary

i need to automate the selection of the Tree node using sapguilibrary as per the document i am using Select Node keyword but i am not getting what is tree_id means(I am not SAP developer). i used the tracker to get the element_id but document says…
chiranjeevigk
  • 1,636
  • 1
  • 23
  • 43
0
votes
1 answer

How to make a loop to delete a sheet if and only if the values are the same?

I extract data from SAP to excel, I do this: the transaction runs automatically in SAP GUI, then saves the data in a txt file VBA reads my txt file Glue it in an Excel temp sheet and then in my table The problem is that sometimes I don't have any…
XDSSIOP
  • 91
  • 3
  • 11
0
votes
0 answers

How to bypass intermittent popup "no data selected"?

I'm making a vba code to import my data from SAP GUI I was wondering, how to do a loop that "clicks OK" when SAP tells No data has been selected this means that for this year for example no data has been entered in sap for a given transaction. …
XDSSIOP
  • 91
  • 3
  • 11
0
votes
1 answer

End of statement VBA with SAP GUI script

I'm doing macro with connection but this syntax error appeared: End of Statement I tried to duplicate the quotation marks but unsuccessfully, another error appeared. LINHA = 11 Cells(11, 1).Select Cells(LINHA, 2).Value =…
0
votes
0 answers

"execution interrupted" and VB editor highlights "end if" in yellow

I have several transactions to automate and then paste into several tables. My code works for my first transaction but for the others I put the same code I just deleted the sheets in which I put it and it doesn't work at all. Public SapGuiAuto,…
XDSSIOP
  • 91
  • 3
  • 11