on 2020 Jun 09 6:22 PM
I'm trying to write a script to copy the value in the ABC Indicator field from the IL03 panel. So far I can launch SAP from an excel macro, go to the IL03 using a functional location that I specify in Excel, but from here I'm lost. Once I get to the IL03 panel, how do I take the value in the ABC Indicator field and put it in either the clipboard or directly into an Excel cell?
' Opens SAP
Dim SapGuiAuto
Dim SetApp
Dim Connection
Dim Session
Set SapGuiAuto = GetObject("SAPGUI")
Set SetApp = SapGuiAuto.GetScriptingEngine
Set Connection = SetApp.Children(0)
Set Session = Connection.Children(0)
'Goes to IL03 Panel
Session.findById("wnd[0]").resizeWorkingPane 169, 41, False
Session.findById("wnd[0]/tbar[0]/okcd").Text = "/nIL03"
Session.findById("wnd[0]").sendVKey 0
'Inserts Value from Functional Location in Excel
Session.findById("wnd[0]/usr/ctxtIFLO-TPLNR").Text = Sheet1.Cells(9, 3).Value
Session.findById("wnd[0]").sendVKey 0
I can see that the field appears to be F[T370C_T-ABCTX] with location [11,31], but I'm not sure what do with that.
Request clarification before answering.
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.