Hi Guys Please help,
I have an excel where in Column A it will have all Data (almost 500) - When User click Macro Button it needs to copy each cell and past in SAP Transaction.
I have a SAP Script but when i run this script its not fetching all Data from Excel. Kindly help..,
I have an excel where in Column A it will have all Data (almost 500) - When User click Macro Button it needs to copy each cell and past in SAP Transaction.
I have a SAP Script but when i run this script its not fetching all Data from Excel. Kindly help..,
Code:
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
WScript.ConnectObject session, "on"
WScript.ConnectObject application, "on"
End If
session.findById("wnd[0]").maximize
session.findById("wnd[0]/tbar[0]/okcd").text = "MMAM"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/ctxtRM03Z-MATNR").text = "JC69-01216X"
session.findById("wnd[0]/usr/cmbRM03Z-NMTAR").key = "HALB"
session.findById("wnd[0]/usr/cmbRM03Z-NMTAR").setFocus
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/tbar[1]/btn[8]").press