Skip to Content
0

HOW TO GET Tree Node text via CBTA

Aug 17, 2017 at 01:52 PM

182

avatar image
Former Member

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member Sep 14, 2017 at 10:00 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded