on 05-21-2013 6:59 AM
Hello Experts,
I got an requirement to develop ALV tree structure with multilevel (level do not know at design time). I have gone through SDN but didn't found any relevant answer.
Currently I am using the way as follows:
My Node structure is :
I am using Code with in WDDOINIT method of Componentcontroller is as below:
data: l_ref_cmp_usage type ref to if_wd_component_usage.
l_ref_cmp_usage = wd_this->wd_cpuse_alv_bucketlist( ).
if l_ref_cmp_usage->has_active_component( ) is initial.
l_ref_cmp_usage->create_component( ).
endif.
data l_salv_wd_table type ref to iwci_salv_wd_table.
l_salv_wd_table = wd_this->wd_cpifc_alv_bucketlist( ).
data l_table type ref to cl_salv_wd_config_table.
l_table = l_salv_wd_table->get_model( ).
data l_column type ref to cl_salv_wd_column.
data l_header type ref to cl_salv_wd_column_header.
l_table->if_salv_wd_table_settings~set_width( '100%' ).
l_table->IF_SALV_WD_TABLE_SETTINGS~SET_DISPLAY_TYPE(
IF_SALV_WD_C_TABLE_SETTINGS=>DISPLAY_TYPE_HIERARCHY ).
l_column = l_table->if_salv_wd_column_settings~get_column( 'PRNTB' ).
l_column->if_salv_wd_column_hierarchy~set_hierarchy_column( abap_true ).
l_column = l_table->if_salv_wd_column_settings~get_column( 'BUKID' ).
l_column->if_salv_wd_column_hierarchy~set_hierarchy_column( abap_true ).
l_table->if_salv_wd_table_hierarchy~set_last_hier_column_as_leaf( abap_true ).
But it display only the 2 level, i.e 1st it display the 'bukid' then 'parntb' .
My problem is I want to display records of each hierarchy level, like
Root
child
child
------
Please give some Ideas, how can I implement the same.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
One possible approach would be to define hierarchies at runtime in Settings -> Display -> Hierarcy -> Define and save this as views (but it is not as dynamic as you would like).
Best regards,
Guillaume
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for reply.
I did not find the Hierarchy button in the path you have provided...
Settings-->Display-->hierarchy
Actually I need to Implement the ALV tree as like as the Table tree behaves in the Webdynpro.
I have my internal table filled with values like:
bukid bnumb parent
1 top 0
2 A 1
3 B 2
4 TOP1 0
5 X 4
Here Levels are not defined at run time. I tried with Webdynpro ALV DISPLAY_TYPE_HIERARCHY
I have used a link below:
but this goes with two levels only...and works differently i.e not same as table tree..
I requirement is to go with ALV tree.....Please let me know..
Any idea........
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
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.