2007 Oct 26 6:51 AM
Dear All,
I placed one REFERSH Button in ALV application tool bar, when Click on this button then the list should reexecute itself with previous selection screen values.
please suggest me on this.
Regards,
Sudhakar Y.
2007 Oct 26 7:02 AM
hi,
just check dis out:-
In ALV, to refresh the table you have to call the method "refresh_table_display".
It has the syntax very similar to creating the table.
It has two parameters. In the first one, you can mention if you want to refresh only the data (the icons are not refreshed)
or
if you want to refresh only the icons around the grid (the data is not refreshed - this option is mostly not used in day to day applications).
the synatx is :-
call method grid (name of grid )->refresh_table_display
exporting
IS_STABLE = <STRUCT OF TYPE LVC_S_STBL> (THIS IS FOR DATA REFRESHING)
I_SOFT_REFRESH = <VARIABLE OF CHAR 01> (THIS IS FOR ICON REFRESHING).
Refresh grid display
Use the grid method REFRESH_TABLE_DISPLAY
Sample code:-
http://www.erpgenie.com/sap/abap/controls/alvgrid.htm#Refresh%20grid%20display
TO refresh the ALV Lsit :
http://www.sap-basis-abap.com/abap/auto-refresh-alv-list.htm
or
ALV :
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = SY-REPID
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
i_structure_name = 'ITAB_DISPLAY'
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN '&DEALL'.
Message for reselection of lines
IF itab_display-kalab LE 0.
MESSAGE i101.
EXIT.
To refresh...
rs_selfield-refresh = 'X'.
plzzz if u find it useful,den give ponts also.
regards,
ric.s