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

alv refresh

Former Member
0 Likes
321

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

1 REPLY 1
Read only

Former Member
0 Likes
299

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