2009 Jul 17 4:33 PM
Hi Experts,
Plz let me know how to find out the level count(level number) after expanding the alv tree.
In the UI if i drop down the nodes of a tree till some level, i need to know at what level i am in.
Thanks,
Kumar
2009 Jul 23 8:21 AM
Hi Kumar ,
If you've got the node key of the selected node , than you can easily find the level by the help of GET_PARENT
GET_PATH methods of cl_gui_alv_tree. Otherwise , considering the condition that you can't modify the program it is not possible.
Hi Kumar ,
If you've got the node key of the selected node , than you can easily find the level by the help of GET_PARENT
GET_PATH methods of cl_gui_alv_tree. Otherwise , considering the condition that you can't modify the program it is not possible.
2009 Jul 20 6:53 AM
hi.
This code will help u..
CALL METHOD G_ALV_TREE->ADD_NODE
EXPORTING
I_RELAT_NODE_KEY = P_RELAT_KEY
IS_NODE_LAYOUT = FOLDER
I_RELATIONSHIP = CL_GUI_COLUMN_TREE=>RELAT_LAST_CHILD
I_NODE_TEXT = L_NODE_TEXT
IS_OUTTAB_LINE = IT_KUNNR
IMPORTING
E_NEW_NODE_KEY = P_L_DATE_KEY.
in this i_relate_node_key tell the level of selection...
2009 Jul 22 12:00 PM
Hi ,
While you're adding nodes to your tree , you can fill an internal table with two fields which has 2 columns ; NODE KEY and LEVEL.
When a node is picked , you can easily get the node key and find the level using the internal table.
OR
you can just write the level inside the structure of the node . You basiclly add a level field and make it invisible.
2009 Jul 23 6:27 AM
Hi,
Thanks for your reply,but here i am not mannully populating the internal table which populates the tree 'or' in other words i cannot do any modifications while tree is gettng populated.
I need to trigger the PAI when i expand the third level of the tree..please let me know how to do this.
Thanks
Kumar
2009 Jul 23 8:21 AM
Hi Kumar ,
If you've got the node key of the selected node , than you can easily find the level by the help of GET_PARENT
GET_PATH methods of cl_gui_alv_tree. Otherwise , considering the condition that you can't modify the program it is not possible.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |