on 01-20-2020 12:16 PM
Hi , I'm new to Excel Macro and tried to do automation in SAP GUI.
I need help to do copy sales order number in to GSAP.
Currently i'm using Range("D3") instead and would like to change in to variable , so i can proceed for looping function.
Thanks in advance
Here's my current script
ub GSAP_VF01() 'setting the connection with sap: Dim App, Connection, session As Object Set SapGuiAuto = GetObject("SAPGUI") Set App = SapGuiAuto.GetScriptingEngine Set Connection = App.Children(0) Set session = Connection.Children(0)
session.findById("wnd[0]").resizeWorkingPane 138, 23, False session.findById("wnd[0]/tbar[0]/okcd").Text = "vf01" session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]/usr/cmbRV60A-FKART").Key = "ZF5" session.findById("wnd[0]/usr/ctxtRV60A-FKDAT").Text = Range("D3") session.findById("wnd[0]/usr/tblSAPMV60ATCTRL_ERF_FAKT/ctxtKOMFK-VBELN[0,0]").Text = Range("C3") session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]/usr/btnTC_OUTPUT").press session.findById("wnd[0]/usr/tblSAPDV70ATC_NAST3/ctxtDNAST-KSCHL[1,1]").Text = "zina" session.findById("wnd[0]/usr/tblSAPDV70ATC_NAST3/ctxtDNAST-KSCHL[1,2]").Text = "zinb" session.findById("wnd[0]/usr/tblSAPDV70ATC_NAST3/ctxtDNAST-KSCHL[1,2]").SetFocus session.findById("wnd[0]/usr/tblSAPDV70ATC_NAST3/ctxtDNAST-KSCHL[1,2]").caretPosition = 4 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]/usr/tblSAPDV70ATC_NAST3").getAbsoluteRow(0).Selected = True session.findById("wnd[0]/usr/tblSAPDV70ATC_NAST3").getAbsoluteRow(1).Selected = True session.findById("wnd[0]/usr/tblSAPDV70ATC_NAST3").getAbsoluteRow(2).Selected = True session.findById("wnd[0]/usr/tblSAPDV70ATC_NAST3/lblDV70A-STATUSICON[0,2]").SetFocus session.findById("wnd[0]/usr/tblSAPDV70ATC_NAST3/lblDV70A-STATUSICON[0,2]").caretPosition = 0 session.findById("wnd[0]/tbar[1]/btn[2]").press session.findById("wnd[0]/usr/ctxtNAST-LDEST").Text = "CBJ02P167_SMPS" session.findById("wnd[0]/usr/ctxtNAST-LDEST").caretPosition = 14 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]/tbar[0]/btn[3]").press session.findById("wnd[0]/tbar[1]/btn[2]").press session.findById("wnd[0]/usr/ctxtNAST-LDEST").Text = "CBJ02P167_SMPS" session.findById("wnd[0]/usr/ctxtNAST-LDEST").caretPosition = 14 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]/tbar[0]/btn[3]").press session.findById("wnd[0]/tbar[1]/btn[2]").press session.findById("wnd[0]/usr/ctxtNAST-LDEST").Text = "CBJ02P167_SMPS" session.findById("wnd[0]/usr/ctxtNAST-LDEST").SetFocus session.findById("wnd[0]/usr/ctxtNAST-LDEST").caretPosition = 14 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]/tbar[0]/btn[3]").press session.findById("wnd[0]/tbar[0]/btn[11]").press session.findById("wnd[0]/tbar[0]/okcd").Text = "/nvf03" session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]/mbar/menu[0]/menu[11]").Select session.findById("wnd[1]/usr/tblSAPLVMSGTABCONTROL").getAbsoluteRow(0).Selected = True session.findById("wnd[1]/tbar[0]/btn[37]").press session.findById("wnd[0]/tbar[0]/okcd").Text = "pdf!" session.findById("wnd[0]").sendVKey 0
End Sub
Hi,
I'm afraid your question is not related to the SAP Intelligent Robotic Process Automation product, but is related to Microsoft Excel macros instead.
However if you're trying to automate the creation of invoice from an Excel file, this is something you can do quite easily using SAP Intelligent RPA.
You can refer to our portal for more details about the product
Regards,
J.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.