Skip to Content
0
Oct 16, 2006 at 10:27 AM

ALV Tree level of leaf

141 Views

When I construct dinamicaly ALV Tree i want to know on which level I am.

base lvl

|- item1 of level1

|- item2 of level1

|- item1 of level2

|- item2 of level2

|- item3 of level1

|- item3 of level2

|- item4 of level2

|- item1 of level3

|- item2 of level3

and so on...

I cant find any property wchich describe in cl_gui_alv_tree how deep I'm in this tree, in which level I'm at this moment.

I decided to write own method "get_level" (recurency method), which check if current node is top node when not add to counter, when yes return this counter which represents current level.

It is important for me because, when I expand current node I create different elements which depends on level od node.

Did I get good way to solve my problem?

I reward in poinst for any help.

Cheers. Tomek