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

Refreshing ALV titlebar

venkat_raman
Associate
Associate
0 Likes
1,379

Hi Experts,

I am using CL_GUI_ALV_GRID class to show ALV output in via docking container.

I am setting my ALV titlebar like following.

if gv_titlebar = 'CHANGE'.

ls_layout-grid_title = 'Change history'.

elseif gv_titlebar = 'DELETE'.

ls_layout-grid_title = 'History of deleted entries'.

endif.

ls_layout is the layout structure of ALV grid. Firstly it show 'Changed history'. Then when I check for delete, second title is set.

but 'change history' only is displayed. Value is correctly assigned. I checked in debugging. But it is not refreshed in ALV display.

refresh_table_display method is also called. Still it is not updated in output. Kindly help me out.

Thanks and regards,

Venkat.

Hi Experts,

I am using CL_GUI_ALV_GRID class to show ALV output in via docking container.

I am setting my ALV titlebar like following.

if gv_titlebar = 'CHANGE'.

ls_layout-grid_title = 'Change history'.

elseif gv_titlebar = 'DELETE'.

ls_layout-grid_title = 'History of deleted entries'.

endif.

ls_layout is the layout structure of ALV grid. Firstly it show 'Changed history'. Then when I check for delete, second title is set.

but 'change history' only is displayed. Value is correctly assigned. I checked in debugging. But it is not refreshed in ALV display.

refresh_table_display method is also called. Still it is not updated in output. Kindly help me out.

Thanks and regards,

Venkat.

2 REPLIES 2
Read only

rathishr_nair
Explorer
706

Hi Venkat,

In the User Command, populate the Layout Structure with new Title and call the method SET_FRONTEND_LAYOUT as follows.

ls_layout-grid_title = 'History of deleted entries'.

CALL METHOD o_grid->set_frontend_layout

EXPORTING

is_layout = ls_layout.

Thanks and Regards,

Rathish R Nair

Edited by: Rathish R Nair on Mar 25, 2011 7:56 AM

Read only

Former Member
0 Likes
706

Hi Venkat,

Just before calling the method for alv display, try to put a if condition and put a temp internal table with ur final data.

Just before displaying the data...set ur pf-status based on the if condition. refresh ur final internal table after calling the method.

When you refresh your final internal table, the data gets refreshed and also the title gets triggered based on the if condition.

Thanks

Guru.