I have ALV table and I made a custom button in the table toolbar. Whenever the button is pressed, I want to delete the selected row. Now there\'s just a message showing up so I
Here is the sample code for deleting selected row:
CASE e_salv_function.
WHEN 'MYFUNC1'.
PERFORM delete_lines.
...
ENDCASE.
form delete_lines.
data: sav_tabix type lvc_index.
clear row_table.
call method grid1->get_selected_rows( et_index_rows = data(row_table) ).
loop at gt_outtab.
sav_tabix = sav_tabix + 1.
read table row_table with key index = sav_tabix.
if sy-subrc = 0.
delete gt_outtab INDEX sav_tabix.
endif.
endloop.
call method grid1->refresh_table_display.
call method cl_gui_cfw=>flush.
endform.