‎2007 May 17 12:12 PM
after generating alv list when i click on one line, i want to store the index number of that line
or how to find the index number of row in alv
‎2007 May 17 12:15 PM
Hi,
Follow thw setps below..
1. call FM lwith call back user command
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
i_callback_program = g_f_repid
i_callback_pf_status_set = 'PF_STATUS_SET'
<b>i_callback_user_command = 'USER_COMMAND'</b>
2. write a form.
FORM user_command USING i_f_ucomm LIKE sy-ucomm
i_r_selfield TYPE slis_selfield.
Check for the click command..
here the <b>i_r_selfield</b> will have the index and other important info..about the selected record.
endform.
---Patil
‎2007 May 17 12:15 PM
Hi,
Follow thw setps below..
1. call FM lwith call back user command
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
i_callback_program = g_f_repid
i_callback_pf_status_set = 'PF_STATUS_SET'
<b>i_callback_user_command = 'USER_COMMAND'</b>
2. write a form.
FORM user_command USING i_f_ucomm LIKE sy-ucomm
i_r_selfield TYPE slis_selfield.
Check for the click command..
here the <b>i_r_selfield</b> will have the index and other important info..about the selected record.
endform.
---Patil
‎2007 May 17 12:16 PM
Hi
use the user_command parameter of the FM, list_alv_grid_display then in the calling form use the rssel_field to get the index number of the selected row.
i) Pass subroutine name to import parameter of FM REUSE_ALV_GRID_DISPLAY as
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'.
ii) Define a subroutine with parameters R_UCOMM TYPE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
Thanks
Srini
‎2007 May 17 12:16 PM