Double clicking a row and column in ALV Grids
Use the field wa_selrow-fieldname
to determine which column was clicked. Be aware that you may have to switch the grid from row selection mode to cell selection mode - since you didn't show us how you created the grid in the first place, I can't tell you how to do this in your case. Take a look at the SEL_MODE
property, it might help.
babno
Updated on June 04, 2022Comments
-
babno almost 2 years
Currently I have an ALV grid and I can double click to call transaction
IE03
and pass the information in the first column (which iseqkt-equnr
). However, this transaction is called regardless of what column you click on. This wouldn't be so bad, but I need to be able to callIW33
if you click on the 3rd column and pass along theequz-J_3GEIGNER
value there.My current double click code is as follows.
t_report
is my struct andmatnr
is theequnr
part of it.maktx
is theJ_3GEIGNER
part of it.FORM user_command USING r_ucomm wa_selrow TYPE slis_selfield. IF r_ucomm = '&IC1'. READ TABLE t_report INDEX wa_selrow-tabindex. IF sy-subrc = 0. SET PARAMETER ID 'EQN' FIELD t_report-matnr. CALL TRANSACTION 'IE03' AND SKIP FIRST SCREEN. ENDIF. ENDIF. ENDFORM.