2005 Apr 29 11:36 AM
I show an ALV, and i want to call a program when somebody click a line of ALV, how can i know what line have clicked the user?
Thanks in advance
2005 Apr 29 11:44 AM
Hi,
In the PAI of the screen
DATA: i_fieldrows TYPE lvc_t_row,
MODULE user_command_9001 INPUT.
CALL METHOD o_alvgrid->get_selected_rows
IMPORTING
et_index_rows = i_fieldrows.
LOOP AT i_fieldrows INTO w_fieldrows.
READ TABLE i_output INTO w_output INDEX w_fieldrows-index.
ENDLOOP.
CASE sy-ucomm.
WHEN 'XX'.
.
.
.
ENDCASE.
If u want to select multiple lines in the grid then in the layout w_layout-sel_mode = 'A'.
Hope this helps.
Thanks & Regards,
Judith.
2005 Apr 29 11:44 AM
Hi,
In the PAI of the screen
DATA: i_fieldrows TYPE lvc_t_row,
MODULE user_command_9001 INPUT.
CALL METHOD o_alvgrid->get_selected_rows
IMPORTING
et_index_rows = i_fieldrows.
LOOP AT i_fieldrows INTO w_fieldrows.
READ TABLE i_output INTO w_output INDEX w_fieldrows-index.
ENDLOOP.
CASE sy-ucomm.
WHEN 'XX'.
.
.
.
ENDCASE.
If u want to select multiple lines in the grid then in the layout w_layout-sel_mode = 'A'.
Hope this helps.
Thanks & Regards,
Judith.