cancel
Showing results for 
Search instead for 
Did you mean: 

get data of all nodes

Hello There,

am trying to get the data (error messages out of secatt transaction from the SAP Tree nodes and their rows and columns). Is there a way to loop thru all the nodes using VBScript to get the data. Until now i was trying something similar to the following code.

session.findById("wnd[0]/usr/cntlCC_LOG_TREE/shellcont/shell").getItemText("         11","2") 
session.findById("wnd[0]/usr/cntlCC_LOG_TREE/shellcont/shell").getItemText("         11","3")

Appreciate your help

Thank you

H

Accepted Solutions (1)

Accepted Solutions (1)

Sandra_Rossi
Active Contributor

Use the method GetAllNodeKeys to get the IDs (nodekeys) of all the lines in the tree control (cf documentation GuiTree Object).

VBScript example to display all nodekeys (in your example, you used the nodekey "11"):

set guitree = session.findById("wnd[0]/usr/cntlCC_LOG_TREE/shellcont/shell")
set coll = guitree.getallnodekeys()
nodekeys = ""
for i = 0 to coll.length - 1
  nodekeys = nodekeys + coll.elementat(i) + " "
next
msgbox nodekeys

Answers (0)