‎2007 Sep 21 6:57 PM
hi,
how can i do refresh fnctionality in alv using Fm.plz help me out.<b><REMOVED BY MODERATOR></b>.with example pgm or code will be helpful
Message was edited by:
Alvaro Tejada Galindo
‎2007 Sep 21 7:00 PM
In the user command subroutine you can give the field REFRESH = 'X'.
Example
FORM USER_COMMAND USING UCOMM LIKE SY-UCOMM SELFIELD TYPE SLIS_SELFIELD.
case UCOMM.
when '&IC1'. "this is for double click.
READ TABLE it_idoc INDEX selfield-tabindex.
SET PARAMETER ID 'DCN' FIELD it_idoc-docnum.
SUBMIT RSEIDOC2 WITH DOCNUM = it_idoc-docnum
WITH CREDAT = It_idoc-credat AND RETURN.
selfield-refresh = 'X'.
ENDCASE.
another sample code...
see the below code..
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
i_callback_user_command = 'USER_COMMAND'
i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_special_groups = gd_tabgroup
IT_EVENTS = GT_XEVENTS
i_save = 'X'
is_variant = z_template
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. " DISPLAY_ALV_REPORT
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'."structure slis_selfield