on 04-07-2010 4:26 PM
hi all,
I have created two customized function of ALV one is used to expand all hierarchy one is used to collapse all hierarchy.
in the event handler ON_FUNCTION i set the code like:
li_cmp_usage = wd_this->wd_cpuse_xml_result_alv( ).
IF li_cmp_usage->has_active_component( ) IS INITIAL.
li_cmp_usage->create_component( ).
ENDIF.
li_interfacecontroller = wd_this->wd_cpifc_xml_result_alv( ).
li_model = li_interfacecontroller->get_model( ).
CASE r_param->id.
WHEN 'EXP_ALL'.
li_model->if_salv_wd_table_hierarchy~set_expanded( abap_true ).
WHEN 'COL_ALL'.
li_model->if_salv_wd_table_hierarchy~set_expanded( abap_false ).
ENDCASE.
but the function expand all only can expand the first level of the hierarchy.
why the method set_expanded doesn't work? How can I deal with this problem?
Best regards
Julia
Hello Julia,
Whatever u did is correct you are just missing call to populate ALV again.So..
CASE r_param->id.
WHEN 'EXP_ALL'.
li_model->if_salv_wd_table_hierarchy~set_expanded( abap_true ).
call populateALV(). " a method which u defined to fetch data and populate ALV
WHEN 'COL_ALL'.
li_model->if_salv_wd_table_hierarchy~set_expanded( abap_false ).
call populateALV(). " a method which u defined to fetch data and populate ALV
ENDCASE.
Thanks,
Swanand.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.