# Tree

![](https://gblobscdn.gitbook.com/assets%2F-M-L9CGkriEo1_2PfJzA%2F-M5WyIL3Y1LiEBixxJle%2F-M5X3tEU7kL-sxCEsz4u%2FSAP_%D0%B4%D0%B5%D1%80%D0%B5%D0%B2%D0%BE_%D0%B8%D0%BA%D0%BE%D0%BD%D0%BA%D0%B0.png?alt=media\&token=5c7ec601-3802-40c5-8a7b-76a017135db2)

Element which gets reference to UI component Tree.

![](/files/z0VvuDylXH67XIdkm5Kz)

Properties:

Element which gets reference to UI component Tree.

Properties:

* Control ID: \[String] Control ID
* Control: \[LTools.SAP.Model.SAPUIItem] Control reference
* Tree: \[LTools.SAP.Model.SAPUITree] Variable that stores tree reference
* Variable: \[LTools.SAP.Model.SAPUITree] Variable to store tree reference
* Nodes: \[List] Tree nodes
* Select: \[String] Select tree node
* Double click: \[String] Node double click
* Expand: \[String] Expand node
* Collapse: \[String] Collapse node
* Time-out\*: \[Int32] Maximum waiting time for process completion (ms)

LTools.SAP.Model.SAPUITree:

* \[SAPFEWSELib.ISapTreeTarget] Element - Element reference;
* \[String] Id - Element ID;
* \[List\<String>] ColumnTitles - Column titles;
* \[List\<String>] ColumnNames - Column names;
* \[List\<LTools.SAP.Model.SAPUITreeNode>] Nodes - Tree nodes;
* SelectNode(String key - node key) - Select tree node;
* DoubleClickNode(String key - node key) - Perform node double click.

LTools.SAP.Model.SAPUITreeNode:

* \[String] Key - Node key;
* \[String] Text - Node text.

```
C#
LTools.SAP.SapApp app = LTools.SAP.SapApp.Init(wf);
LTools.SAP.Model.SAPUITree tree = app.Tree("/app/con[0]/ses[0]/wnd[0]/usr/cntlIMAGE_CONTAINER/shellcont/shell/shellcont[0]/shell");
tree.ExpandNode(tree.Nodes[0].Key);

Python
app = LTools.SAP.SapApp.Init(wf);
tree = app.Tree("/app/con[0]/ses[0]/wnd[0]/usr/cntlIMAGE_CONTAINER/shellcont/shell/shellcont[0]/shell")
tree.ExpandNode(tree.Nodes[0].Key)

JavaScript
var app = _lib.LTools.SAP.SapApp.Init(wf);		
var tree = app.Tree("/app/con[0]/ses[0]/wnd[0]/usr/cntlIMAGE_CONTAINER/shellcont/shell/shellcont[0]/shell");
tree.ExpandNode(tree.Nodes[0].Key);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://astro-rpa.gitbook.io/astro-rpa-user-guide/g_elements/el_basic/els_sap/el_sap_tree.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
