Code: Alles auswählen.
FORM alv_user_command1 CHANGING r_ucomm LIKE sy-ucomm "#EC CALLED
rs_selfield TYPE slis_selfield.
DATA: ls_ekko LIKE LINE OF it_ekko.
READ TABLE it_ekko INDEX rs_selfield-tabindex INTO ls_ekko.
CASE r_ucomm.
WHEN '&IC1'.
call transaction 'ME23N'. // Hier zu aktuell geklickter Zeile die Belegnummer
endcase.
endform.
Code: Alles auswählen.
SET PARAMETER ID 'BES' FIELD ls_ekko-ebeln.
Code: Alles auswählen.
FORM alv_user_command1 CHANGING r_ucomm LIKE sy-ucomm "#EC CALLED
rs_selfield TYPE slis_selfield.
DATA: ls_ekko LIKE LINE OF it_ekko.
READ TABLE it_ekko INDEX rs_selfield-tabindex INTO ls_ekko.
CASE r_ucomm.
WHEN '&IC1'.
SET PARAMETER ID 'BES' FIELD ls_ekko-ebeln.
CALL TRANSACTION 'ME23N'.
ENDCASE.