‎2006 Jul 26 10:16 AM
Hi all,
I need to get grid title dynamically for single screen for user actions through buttons.What is the option available in cl_gui_alv_grid.
in reuse_alv_grid_display one field grid_title is available .but here i could not able to find anything like this .how to solve this issue.
thanks in advance,
raja
‎2006 Jul 26 11:00 AM
When user presses a button on the application toolbar....with function code ( say TITL ) then the grid_title field can be changed manually and can be reflected in the display by refreshing the table using the method below..
please try this....
flag = 1.
FORM user_command USING u_ucomm LIKE sy-ucomm
us_selfield TYPE slis_selfield.
CASE u_ucomm.
WHEN 'TITL'.
IF flag EQ 1.
flag = 2.
grid_title = 'ALV_DISPLAY_1'.
CALL METHOD grid->refresh_table_display
EXPORTING
IS_STABLE =
I_SOFT_REFRESH =
EXCEPTIONS
FINISHED = 1
others = 2.
elseif flag eq 2.
flag = 1.
grid_title = 'ALV_DISPLAY_2'.
CALL METHOD grid->refresh_table_display
EXPORTING
IS_STABLE =
I_SOFT_REFRESH =
EXCEPTIONS
FINISHED = 1
others = 2.
endif.
ENDCASE.
ENDFORM.