Conectar a SAP desde Excel
prueba con este código
Sub Prueba_AL11()
'
' Prueba AL11 Macro
'
'
Set SAPGuiAuto = GetObject("SAPGUI")
Set Aplicacion = SAPGuiAuto.GetScriptingEngine
Set Connection = Aplicacion.Children(0)
Set Session = Connection.Children(0)
' maximiza la pantalla de SAP
Session.findById("wnd[0]").maximize
' escoge la transición a enviar
Session.findById("wnd[0]/tbar[0]/okcd").text = "/n/AL11"
' llama a la transición
Session.findById("wnd[0]").sendVKey 0
|