0
votes

So after I deleted a specific row in a database Table, it isn't removed on my screen. I have to end the programm and start it again to see the changes. I've used alv->refresh( ). but this does not work for me. Is there a way to refresh the screen properly?

2
Possible duplicate of ABAP - ALV delete selected row - vwegert
Please refrain from asking serial questions without posting answers to the ones you already solved and without making the connections clear. - vwegert

2 Answers

1
votes

the refresh method has to have an importing parameter called is_stable. This structure has two fields (rwo and col) set both to 'X':

alv->refresh( is_stable = 'XX' ).
0
votes

If the answer above doesn't work, you can use this method, it gets current ALV from global memory.

METHOD refresh_alv.
  DATA: ref_grid TYPE REF TO cl_gui_alv_grid, valid TYPE c.
  IF ref_grid IS INITIAL.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
      IMPORTING
        e_grid = ref_grid.
  ENDIF.

  IF NOT ref_grid IS INITIAL.
    ref_grid->check_changed_data(
       IMPORTING
         e_valid = valid ).
  ENDIF.

  IF valid IS NOT INITIAL.
    ref_grid->refresh_table_display( ) .
  ENDIF.
ENDMETHOD.