‎2007 Sep 19 2:58 PM
Hi,
I'm using FM 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' for ALV list .
How do I refresh the list display.
Is there any function module for the same.
Pls help
Thanjs
‎2007 Sep 19 3:12 PM
hi,
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.
<b>To refresh...
rs_selfield-refresh = 'X'."structure slis_selfield</b>
Regards
Ramesh.
‎2007 Sep 19 3:05 PM
‎2007 Sep 19 3:08 PM
Hi Prabha
I created a button in my dynpro "refresh".
declaration:
DATA: alv_list1 TYPE REF TO cl_gui_alv_grid,
insert this code into the PAI module:
CASE ok_code.
WHEN 'REFRESH'. CALL METHOD alv_list1->refresh_table_display.
ENDCASE.
Regards,
Steffen
Message was edited by: Steffen Fröhlich
sorry I was talking by an ALV-GRID...
‎2007 Sep 19 3:12 PM
hi
good
go through this link
http://www.sap-img.com/abap/test-alv-display-with-header-footer.htm
thanks
mrutyun^
‎2007 Sep 19 3:12 PM
hi,
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.
<b>To refresh...
rs_selfield-refresh = 'X'."structure slis_selfield</b>
Regards
Ramesh.
‎2007 Sep 19 3:14 PM
Hi
Pls, Go through this link it will be help full for you create ALV Automatically.
http://www.alvrobot.com.ar/SRG_1.php
Let me know if u need further help.
‎2007 Sep 19 4:26 PM
hi,
to refresh the screen we have to use below command...
rs_selfield-refresh = 'X'.
thanks,
maheedhar
‎2007 Sep 19 5:06 PM
Take a look at the code below. Its used with REUSE_ALV_GRID_DISPLAY. But you can still customize it quite easily for your case.
DATA: lt_event_exit TYPE slis_t_event_exit,
ls_event_exit TYPE slis_event_exit.
CONSTANTS: gc_refresh TYPE syucomm VALUE '&REFRESH'.
START-OF-SELECTION.
PERFORM data_retrieval.
PERFORM build_fieldcatalog.
PERFORM build_sort.
PERFORM build_layout.
PERFORM build_refresh.
PERFORM display_alv_report.
FORM display_alv_report.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
i_callback_pf_status_set = 'BUILD_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
is_layout = gd_layout
it_fieldcat = fieldcatalog
it_sort = gd_sort
it_events = gt_events
it_event_exit = lt_event_exit
is_print = gd_prntparams
i_save = 'X'
TABLES
t_outtab = i_zopen_alv
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. "Condition on command executed
WHEN gc_refresh. "When the REFRESH button has been clicked
REFRESH i_zopen_alv. "Refresh data
PERFORM data_retrieval. "Retrieve data
rs_selfield-refresh = 'X'.
rs_selfield-col_stable = 'X' .
rs_selfield-row_stable = 'X' .
ENDCASE.
ENDFORM. "user_command
FORM build_refresh.
CLEAR ls_event_exit.
ls_event_exit-ucomm = gc_refresh. " Refresh
ls_event_exit-after = 'X'.
APPEND ls_event_exit TO lt_event_exit.
ENDFORM. "build_refreshMessage was edited by:
Megan Flores