Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

refresh alv list display

Hi,

how to refresh an ALV LIST display?

Thanks.

Tags:
Former Member
Former Member replied

Hi,

just after displaying alv output refresh_table_display is to refresh table .

But after displaying alv output if you want to refresh alv output

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_program_name

= alv_prog

i_structure_name

= Structure name has to be in capital'

i_inclname

= alv_prog

CHANGING

ct_fieldcat

= alv_fieldcat

EXCEPTIONS

inconsistent_interface = 1

program_error

= 2

OTHERS

= 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

  • Display ALV grid

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_bypassing_buffer

= 'X'

i_callback_program

= alv_prog

i_callback_pf_status_set = 'SET_PF_STATUS'

i_callback_user_command = 'HANDLE_USER_COMMAND'

i_grid_title

= sy-title

is_layout

= alv_layout

it_fieldcat

= alv_fieldcat

it_excluding

= alv_exclude

i_save

= 'A'

TABLES

t_outtab

= tab

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.

FORM set_pf_status USING rt_extab TYPE slis_t_extab.

SET PF-STATUS 'XXXX' EXCLUDING action.

ENDFORM."SET_PF_STATUS

FORM handle_user_command USING r_ucomm

LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

CASE r_ucomm.

WHEN 'UPDATE'.

PERFORM update_routine.

WHEN '&IC1'.

IF rs_selfield-fieldname = 'IDOC_NUM' OR

rs_selfield-fieldname = 'IDOC_NUM_OUT'.

PERFORM drill_down USING rs_selfield-value.

ENDIF.

WHEN 'SAVE'.

DATA ref1 TYPE REF TO cl_gui_alv_grid.

CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'

IMPORTING

e_grid = ref1.

CALL METHOD ref1->check_changed_data.

PERFORM save_routine.

WHEN 'REFRESH'.

PERFORM get_selection.

WHEN OTHERS.

ENDCASE.

rs_selfield-refresh = 'X'.

"Refresh screen

ENDFORM.

"HANDLE_USER_COMMAND

use this option it will work.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question