sap-gui

How to run SAP GUI script from Excel Macro

房东的猫 提交于 2020-06-27 13:37:29
问题 I am trying to create a Excel macro which executes the SAP GUI Script. I already created the SAP script but I didn't understand how to use that in VBA macro. This is my SAP GUI Script : 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 If IsObject(WScript) Then

How can the speed of a SAP GUI VBA script be boosted?

你。 提交于 2020-04-12 08:05:53
问题 I have created a GUI VBA script to update entries in a SAP table based on values in an Excel file. The Excel file is just an extracted version of the SAP table with new dates. The script gets the values from a record in Excel searches the SAP table with the same and then changes a specific value, in this case the End Date. The bottleneck here is that only one line can be processed at a time. Additional details: lines processed per minute:10 Total Lines -180k Estimated time to process all

Vba sap gui scripting choose specific session

做~自己de王妃 提交于 2020-02-03 01:50:50
问题 I am trying to run an Excel VBA code which uses SAP GUI Scripting. I have some open sessions in Sap and using two systems "F6P" and "FVP" at the same time. How to run on one of the "FVP" sessions? You can see below there are two session open One is F6P SAP box and the other is FVP SAP box. Option Explicit Public SapGui, App, Connection, Session, SapGuiAuto, WScript Sub Overconfirmation() Call SAP Call tcode End Sub SAP() If Not IsObject(App) Then Set SapGuiAuto = GetObject("SAPGUI") Set App =

SAP GUI script: read table or data from ALV Grid

孤街醉人 提交于 2019-12-11 14:52:46
问题 I'm currently creating an automation script where data from excel will be searched in SAP table. I tried to record the steps in SAP but it only gives me this: session.findById("wnd[0]").maximize session.findById("wnd[0]/usr/lbl[18,15]").setFocus session.findById("wnd[0]/usr/lbl[18,15]").caretPosition = 10 Which I know that it tells me the current cell address. When I tried to check the table name (F1), it gives me the name of "RFPOSXEXT". I'm not sure how I can proceed for me to search the

Selecting SAP Fields using a Do Loop VBA

佐手、 提交于 2019-12-11 11:12:11
问题 I am working on a macro to go into SAP and select cells in a column to extract to excel. Now if this was excel, this would be no problem as I would simply use a do loop to travel down the column copying along the way. I am in SAP GUI however which is compatible with VBA and it is a little different. I recorded a script of me clicking down a column to see how the code changes. This is what I got. session.findById("wnd[0]").maximize session.findById("wnd[0]/usr/lbl[12,13]").setFocus session

How to set current cell on SAP GUIContainerShell in C#?

喜欢而已 提交于 2019-12-10 11:59:31
问题 I am automating my work with SAP GUI script at the moment and whilst trying to recreate the recorded macro I am having an issue at one particular point which I don't know how to translate. session.findById("wnd[0]/shellcont/shell/shellcont[1]/shell").setCurrentCell 1,"MAKTX2" session.findById("wnd[0]/shellcont/shell/shellcont[1]/shell").doubleClickCurrentCell session.findById("wnd[1]/tbar[0]/btn[0]").press I have read through the SAP GUI Scripting API pdf and am struggling to see how I action

Extracting .currentCellRow fields from SAP to Excel

独自空忆成欢 提交于 2019-12-08 13:07:07
问题 I have been using vba with SAP for a while now and have never run into this particular issue. Usually, when script recording in SAP, I click on a field and am left with some string of code with a .setfocus as the end. I replace this with .text in order to extract the data in that cell. I have run into a menu that ends in .currentCellRow= # and thus if I change it, it loses its position and has no idea what field I am talking about. Is there any way that I can adjust this to pull data from