‎2008 Apr 08 3:02 PM
hi,
i am calling a alv-screen with FM REUSE_ALV_GRID_DISPLAY
as the output-table changes in some situations, is it possible to 'refresh' the alv-out-tab automaticly in ABAP ?
reg, Martin
‎2008 Apr 08 3:12 PM
Try this way
Pl. check for rs_selfield-refresh = 'X' in the below mentioned code
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
it_fieldcat = i_fieldcat[]
is_layout = pt_grplayout2
i_callback_program = 'YATTU0007'
i_callback_html_top_of_page = p_header
i_callback_user_command = f_user_command1
it_events = i_events[]
tables
t_outtab = i_yatthdr.
*
*&---------------------------------------------------------------------*
* Form f_user_command1 *
*&---------------------------------------------------------------------*
* This form will handle the user command from fm REUSE *
*----------------------------------------------------------------------*
form f_user_command1 using p_ucomm type sy-ucomm
rs_selfield type slis_selfield.
data p_ref1 type ref to cl_gui_alv_grid.
call function 'GET_GLOBALS_FROM_SLVC_FULLSCR'
importing
e_grid = p_ref1.
call method p_ref1->check_changed_data.
case p_ucomm.
endcase.
rs_selfield-refresh = 'X'. " Grid refresh
endform. " F_user_command1
*
a®
‎2008 Apr 08 3:29 PM
well, i have already tried it with that
but it does not work. the alv-table is not updated !
reg, Martin
‎2008 Apr 08 3:46 PM
I think you need to call
rs_selfield-refresh = 'X'. " Grid refresh
after this call
data p_ref1 type ref to cl_gui_alv_grid.
call function 'GET_GLOBALS_FROM_SLVC_FULLSCR'
importing
e_grid = p_ref1.
call method p_ref1->check_changed_data.
a®
‎2008 Apr 08 4:03 PM
i found another way:
i just do a modifiy on the grid-table !
but i think this is more the 'quick and dirty' way, isn't it ?
reg, martin
‎2008 Apr 08 4:07 PM
the problem is more complex:
i have to redirect the abap to the whole logic of creating the alv-out-tab ! it does NOT help me just to say 'refresh'
best reg, Martin
‎2008 Apr 08 4:11 PM
Hi Martin,
If you want to manually refresh ALV using REFRESH button on application toolbar, try this
FORM USER_COMMAND ..................
CASE P_UCOMM.
*refreshes ALV Grid
When '&NTE'.
SUBMIT <PROGRAM_NAME>. <---give the same program name
ENDCASE.
‎2008 Apr 08 4:14 PM
hi,
that does not sound very logical for me. i can't call the programm again, as there are complex parameters and select options in it ! i have to start it exactly with the SAME parameters !
reg, Martin
btw: i can't find an 'refresh button' in alv !?!??!?!
Edited by: Martin Svik on Apr 8, 2008 5:15 PM
‎2008 Apr 08 5:17 PM
well, there is a new question:
is it possible to have an flexible ALV-header ? e.h. when i click on a specific line in alv data should be placed in the HEADER of alv !
reg, Martin
‎2008 Apr 08 9:01 PM
Hello Martin
You may have a look at sample report ZUS_SDN_FM_ALV_REFRESH in
The report demonstrates how to refresh the ALV list. However, this has to be done manually.
Regards
Uwe