ALV ITAB USER COMMAND
Aus SAP-Wiki
Zur Navigation springenZur Suche springen
Siehe Kategorie: ALV.
*&--------------------------------------------------------------------- *& Form USER_COMMAND *&--------------------------------------------------------------------- * User Command *---------------------------------------------------------------------- form alv_itab_user_command "#EC CALLED using r_ucomm type sy-ucomm rs_selfield type slis_selfield. Data: ls_itab type ty_itab. DATA: l_ref_alv TYPE REF TO cl_gui_alv_grid, l_valid TYPE c. "#EC NEEDED * geänderte Daten holen * Referenz auf ALV holen CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR' IMPORTING e_grid = l_ref_alv. * Gibt die geänderte ITAB zurück CALL METHOD l_ref_alv->check_changed_data IMPORTING e_valid = l_valid. * Prüfe ob ein Doppelklick auf eine Zeile erfolgte case r_ucomm. WHEN 'NEWLINE'. CALL METHOD l_ref_alv->APPEND_ROWS EXPORTING I_ROW_COUNT = 1. when '&IC1'. * Read line of clicked item read table gt_itab index rs_selfield-tabindex into ls_itab. case rs_selfield-fieldname. * when . endcase. endcase. endform. " USER_COMMAND_ITAB