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

Find SAP GUI session opened for given SAP system

First I want to check via VBA, before I do some transactions in SAP GUI, if a connection is already open. I am not able to login a second time, so I need to stay in the same connection. Secondly I want to open another session. The second problem has…
iAmMiee
  • 27
  • 1
  • 8
1
vote
0 answers

Excel VBA runs step by step but not in whole

I have written the below code to export data from SAP GUI. If I go step by step everything works fine. Excel is exported and data is copied to the proper place. But if I try to run it NOT step by step it goes on error (subscript out of range). The…
1
vote
0 answers

How can I translate the Technical Settings Infos from SAP into an ID?

I am currently working on SAP Scripting with Python and I would like to ask you for an alternative way of getting the ID of an object. I saw that the scripting tracker from Stefan Schnell would be perfect for this but unfortunately, I am working on…
1
vote
1 answer

variable I = i + 1 makes a mess with a part of the code (Rowcount - 4) How to ignore a variable for this part?

My variable doing mess with my part of code (Rowcount - 4, NETPR). Can I ignore this variable for this part and how? 'here is code to connect SAP Dim ses As Object i=…
BretaOne
  • 15
  • 5
1
vote
1 answer

SAP Gui Scipting GridView code don't extract correct data from SAP

So I am developing a data extractor in order to extract SAP data using SAP Gui Scripting + VBA (Excel). The script will run a transaction and extract the data to excel. The following is the code to extract the data from gridview: 'Save…
Ossevaolep
  • 23
  • 4
1
vote
2 answers

VBA is sometimes not recognizing Excel file that has been opened through SAP GUI script

I have a SAP GUI script running every day in VBA. In the script I am exporting some data from SAP to several different Excel files, and these are saved to a network drive. In the first macro, I export data. In the second I copy the data to the same…
sebsee
  • 83
  • 5
1
vote
1 answer

Issue establishing connection with SAP

I am trying to establish connection using SAP GUI from Excel VBA and keep getting the same 424 error. Runtime Error 424 “Object Required” I've tried multiple ways changing variables but nothing seems to be working for me :( If Not…
Stas Pegov
  • 37
  • 5
1
vote
1 answer

SAPGUI 770 Crashes When Printing to Microsoft Print To PDF

Windows 10 LTSC 2021 (21H2) 64Bit. SAPGUI 770 Patch Level 4 When I try to print anything from SAP to PDF at first nothing happens. I expect a dialog to pop up asking where to save the PDF. Instead, after the work process timeout triggers I get the…
Justin Emlay
  • 904
  • 9
  • 10
1
vote
1 answer

VB.Net CancellationToken does not cancel the Task

I do SAP Gui Scripting in VB.Net with .Net Framework 4.8. At some point the SAP will be unresponsive due to circumstances out of my control, and the called function will completely block further execution forever. In this case i want to safely exit…
TheDomis4
  • 122
  • 1
  • 13
1
vote
1 answer

SAP GUI VBScript for data export results in empty document when run in VBA [excel]

I have a VBScript that runs a data export from SAP GUI. If executed alone or in SAP it runs and results in an excel worksheet with the desired data. However, I want to have it implemented in a VBA Sub. I found this thread that was already very…
Robin
  • 11
  • 4
1
vote
1 answer

How to trap any VBS error and return it to the calling VBA in Access

I have a program in Microsoft Access. I have VBS script files to automate SAP GUI screens ("transactions"). Using VBA in Access opens these different VBS script files using the Scriptcontrol object and performs a transaction in a SAP system. Now,…
Goku
  • 89
  • 7
1
vote
2 answers

Search help using methods for a Data Element in SAP

I have an existing method in a class that returns a list of ids that I would like to use in the search help of a data element (using SE11 transaction). I have been looking for a way to use the method in the search help of my data element but so far…
A Beginner
  • 393
  • 2
  • 12
1
vote
1 answer

Find Message Number of Popup Dialog Text

I don't find the answer on the internet. When I open some orders in a transaction, I have sometimes a popup. I want to execute some code if this popup text is 'Consider the subsequent documents'. If it is another text, I will execute some other…
Eugène
  • 43
  • 6
1
vote
1 answer

How to verify the Active Window in SAP GUI using VBA

I'm currently trying to fix some issues in a SAP procedure using VBA. By now I have a piece of code that can correctly handle the error pop-up that sometimes appears: If session.findById("wnd[2]/usr/txtMESSTXT1").Text = "Material já atualizado para…
1
vote
0 answers

SAP GUI opens Excel Automatically after Report Extraction

I'm trying to automate SAP GUI with VBA to extract some reports from Transactions (FBL5N-FBL3N). There are two main problems: 1- Once SAP GUI Extraction is done it automatically opens the Excel sheet for this extraction 2- Excel Gives an error in…