sapscript

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

Export SAP to excel completely via VBA

最后都变了- 提交于 2019-12-20 05:50:49
问题 I hope you can assist me with the code below. I am trying to export a report from SAP using a recorded SAPscript via VBA on a daily basis. Subsequently I want to copy the data to another workbook and do some reformatting/calculations with it. However, the excel export file will only open after I have fully completed my macro. Using for instance ShellAndWait http://www.cpearson.com/excel/ShellAndWait.aspx assumes that it is an outside application, but I would like to find a solution in which I

Call a SAP transaction, execute with given parameters and download a report with C# or VB.net

99封情书 提交于 2019-12-13 05:14:52
问题 I'm not familiar with ABAP at all and I'm trying to automate a SAP report for my job (downloaded from the result of an executed transaction in SAP R/3). At the moment I have to open SAP (manually of course), login, call the transaction, add some parameters to it, execute it and download the first report. After that I have to work it around (thing that I already automate, so it's not a problem) but then I have to get some other parameters from it and call another transaction to execute with

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

How to find a standard text within a sapscript / smartform

本小妞迷上赌 提交于 2019-12-11 11:32:29
问题 I need to track down where within a large number of custom sapscripts and smartforms a specific standard text (SO10) is being used. Apart from the equivalent of "check the code for each print script", I've not found a workable solution online. Any suggestions? 回答1: After posting, I found a partial solution. The code below will search for a standard text within sapscripts, but not smartforms. PARAMETERS: p_sttxt LIKE stxh-tdname. DATA: BEGIN OF t_stxh OCCURS 0, tdname LIKE stxh-tdname, tdspras

Export SAP to excel completely via VBA

ε祈祈猫儿з 提交于 2019-12-02 11:42:21
I hope you can assist me with the code below. I am trying to export a report from SAP using a recorded SAPscript via VBA on a daily basis. Subsequently I want to copy the data to another workbook and do some reformatting/calculations with it. However, the excel export file will only open after I have fully completed my macro. Using for instance ShellAndWait http://www.cpearson.com/excel/ShellAndWait.aspx assumes that it is an outside application, but I would like to find a solution in which I can keep everything in 1 file. Thanks in advance for your assistance! Edit: Solved! Thanks to