Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Query regarding Expand all functionality in hier seq list.

Former Member
0 Likes
637

Hello Every body,

Application: I am displaying a list(Hier seq) using cl_salv_hierseq_table method.

Important peices of code:-

cl_salv_hierseq_table=>factory(

EXPORTING

t_binding_level1_level2 = gt_binding

IMPORTING

r_hierseq = gt_table

CHANGING

t_table_level1 = gt_final_h

t_table_level2 = gt_final_i ).

*... set expand column

gt_columns->set_expand_column( 'EXPAND' ).

*... set items expanded

gt_level = gt_table->get_level( 1 ).

gt_level->set_items_expanded( ).

*register to the event on_user_command

SET HANDLER gt_events->on_user_command FOR lt_events.

Here i had added Refresh button in the application toolbar of the above ALV which is not in the standard one.

PERFORM refresh_list_info USING e_salv_function.

inside this perform the main peice of code is:

gt_table->refresh( ). "Refresh: Rebuilds the display list.

QUERY: The first display show all the header and items records as expanded by default.

when i am trying to refresh the list, its displaying me the list with updated data in it

properly BUT the only problem is the items are closed by default after refresh.

so every time user needs to click the Expand option to view item records after refresh.

Here I would like to have the items records expanded as well by default after Refresh.

how to acheive this?

Any suggestions to use any more methods or so..

Your help will be highly appreciable.

Thanks,

Pavan.

Hello Every body,

Application: I am displaying a list(Hier seq) using cl_salv_hierseq_table method.

Important peices of code:-

cl_salv_hierseq_table=>factory(

EXPORTING

t_binding_level1_level2 = gt_binding

IMPORTING

r_hierseq = gt_table

CHANGING

t_table_level1 = gt_final_h

t_table_level2 = gt_final_i ).

*... set expand column

gt_columns->set_expand_column( 'EXPAND' ).

*... set items expanded

gt_level = gt_table->get_level( 1 ).

gt_level->set_items_expanded( ).

*register to the event on_user_command

SET HANDLER gt_events->on_user_command FOR lt_events.

Here i had added Refresh button in the application toolbar of the above ALV which is not in the standard one.

PERFORM refresh_list_info USING e_salv_function.

inside this perform the main peice of code is:

gt_table->refresh( ). "Refresh: Rebuilds the display list.

QUERY: The first display show all the header and items records as expanded by default.

when i am trying to refresh the list, its displaying me the list with updated data in it

properly BUT the only problem is the items are closed by default after refresh.

so every time user needs to click the Expand option to view item records after refresh.

Here I would like to have the items records expanded as well by default after Refresh.

how to acheive this?

Any suggestions to use any more methods or so..

Your help will be highly appreciable.

Thanks,

Pavan.

3 REPLIES 3
Read only

Former Member
0 Likes
582

Hi,

You would have to explicitly expand the node again before the refresh.

*... set items expanded

gt_level = gt_table->get_level( 1 ).

gt_level->set_items_expanded( ).

Regards,

Kritesh Shah

Read only

0 Likes
582

Hello Kritesh,

Thank you , I had tried to explicitly define them again before refresh method.

But still that doesnt solved the purpose.

Thanks,

Pavan.

Read only

Former Member