Skip to Content

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Nov 29, 2020 at 06:12 PM

    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
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.