I'm looking for a solution how to read text from SAP table.
I can select specific cell in table, but don't know the reference to get its text value.
Below code works fine but what I need is instead of selectItem
I need to get text from this item.
Relevant part of code :
Dim SapGuiAuto, SAP, Connection, Session
If Not IsObject(SAP) Then
Set SapGuiAuto = GetObject("SAPGUI")
Set SAP = SapGuiAuto.GetScriptingEngine
Set Connection = SAP.Children(0)
Set Session = Connection.Children(0)
End If
ReDim ArrSap(1 To 1, 1 To 1)
Session.findById("wnd[0]/shellcont[0]/shell/shellcont[1]/shell[0]").pressButton "MATE"
Session.findById("wnd[0]").iconify
On Error Resume Next
For i = 1 To 999
Select Case i
Case Is > 99
Case Is > 99
Session.findById("wnd[0]/shellcont[0]/shell/shellcont[1]/shell[1]").selectItem " " & i & "", "C 10"
Session.findById("wnd[0]/shellcont[0]/shell/shellcont[1]/shell[1]").expandNode " " & i & ""
Case Is > 9
Session.findById("wnd[0]/shellcont[0]/shell/shellcont[1]/shell[1]").selectItem " " & i & "", "C 10"
Session.findById("wnd[0]/shellcont[0]/shell/shellcont[1]/shell[1]").expandNode " " & i & ""
Case Else
Session.findById("wnd[0]/shellcont[0]/shell/shellcont[1]/shell[1]").selectItem " " & i & "", "C 10"
Session.findById("wnd[0]/shellcont[0]/shell/shellcont[1]/shell[1]").expandNode " " & i & ""
End Select
Next i