Hi, people!
I would like to make a loop to insert several records , however the record should be inserted at the end of the table.
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]/usr/ctxtADRCITYD-CITY_CODE").text = "4313"
session.findById("wnd[0]/usr/ctxtADRCITYD-COUNTRY").text = "br"
session.findById("wnd[0]/usr/ctxtADRCITYD-COUNTRY").setFocus
session.findById("wnd[0]/usr/ctxtADRCITYD-COUNTRY").caretPosition = 2
session.findById("wnd[0]/tbar[0]/btn[0]").press
session.findById("wnd[0]/tbar[1]/btn[7]").press
help-->"I would like to insert the record 35118-000 always the last line"
session.findById("wnd[0]/usr/tblSAPLSZRLPCD/ctxtADRPCDCITY-POST_CODE[0,6]").text = "35118-000"
session.findById("wnd[0]/usr/tblSAPLSZRLPCD/ctxtADRPCDCITY-POST_CODE[0,6]").setFocus
session.findById("wnd[0]/usr/tblSAPLSZRLPCD/ctxtADRPCDCITY-POST_CODE[0,6]").caretPosition = 0
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/tbar[0]/btn[11]").press
thank you!
Alysson