on 11-03-2013 11:02 AM
Dear Experts,
I have implemented 'Tree by key table column' in my webdybnpro application.Its working great.
Now I got an requirement to get the hierarchy sequence of this table in my internal table and display Report accordingly.
For example: My table tree contains the nodes like (WHEN EXPANDED).
A
--A1
--A11
--A2
--A21
---A211
---A212
This comes with parent - child relationship.
Now my requirement is to get the value in my itab as: (as shown in the expanded structure)
A
A1
A11
A2
A21
A211
A212
Please give some logic to fill my itab accordingly.
Waiting for reply...
Regards,
Chandan.
Hi Chandan,
Its better to use ALV than Normal table UI, because in normal table UI, its difficult to use Sorting and and Filtering, with the requirement you have specified.
But if you go for ALV, its easy to implement and gives all inbuilt features like filtering and sorting, without any extra implementation.
Please find the link for reference both in ALV and Normal Table UI.
Regards,
Harsha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Harsha,
Thanks for your reply. but can not use ALV in this case as table structure to display hierarchy of
Parent - child relationship do not allow me to use this. ALV uses different type to relation table to display the tree. Also there are some more functional objects which can not be implement with ALV tree.
I need to make the solution with Table tree UI element.
Please suggest.
I Chandan,
The solution comes from the relation you mentionned : you have to follow the child relation of each element. It's a recursive code.
For exemple this algorithm could work :
global_itab
get_element_recursive( exporting tree_first_element )
method get_elements_recursive( importing current_element )
append current_element to global_itab
if current_element->has_child.
loop at current_element->childs into child.
get_elements_recursive( exporting child ).
endloop.
endif.
endmethod.
This will fetch all your elements following the parent -> child relation in order.
Please give some logic or relevant answer to get the desired result....
Any doubt, please let me know....
its urgent to me....
Regards,
Chandan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.