cancel
Showing results for 
Search instead for 
Did you mean: 

HOW TO GET Tree Node text via CBTA

Former Member
0 Kudos

Hi All,

I'm trying to capture a text value from a tree structure in SAP Gui using object spy.

I have tried default component CBTA_GUI_GETPROPERTY but , it's not giving me the desired result. Even while recording the same script i tried capturing the text value using GET_DATA but the property was not getting captured.

Although using object spy value is getting captured but the problem is how to get that value in my script. Here it's a sub property of "Selected Node" so using default component CBTA_GUI_GETPROPERTY is not giving correct propert value. I have attached the screen shot of the Object spy result. From the information present in screen shot I'm trying to get text of Node 1.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Braj,

To get the node name from the SAP tree structure., you can use the CBTA_GUI_GETPROPERTY as explained below.

1. In the propertyname in Getproperty use "GETITEMTEXT(Selectednodekey, selecteditemcolumn). method.

2. IT would be something like GetItemText(" 2","COL1")

3. You can get the nodekey and the columnname information under the selected node which you have already mentioned. Make sure to include the spaces before the node key, as it appears when you spy it.

Hope it answers your query.

Thanks

Akhila