Hi Guys,
I am trying record a macro to open an item in a table.
I want to open the last item "TEST RB RC". How will i open it by using a text "TEST RB RC" and not cell count?
What appears on the script after the recording is the cell count and not the text. I tried replacing " 816" to "TEST RB RC" but its not working.
Please help!
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/ssubSUB_CUST:SAPLRHUZ:0400/cntlTREE/shellcont/shell").selectItem " 816","ORG_STEXT"
session.findById("wnd[0]/usr/ssubSUB_CUST:SAPLRHUZ:0400/cntlTREE/shellcont/shell").ensureVisibleHorizontalItem " 816","ORG_STEXT"
session.findById("wnd[0]/usr/ssubSUB_CUST:SAPLRHUZ:0400/btn%#AUTOTEXT006").press
Please check the attachment.
Thanks! screenshot.jpg
Bookmarks