Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

alv

Former Member
0 Likes
467

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

1 ACCEPTED SOLUTION
Read only

santhosh_patil
Contributor
439

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

3 REPLIES 3
Read only

santhosh_patil
Contributor
440

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

Read only

srinivas_akiri
Active Participant
0 Likes
439

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

Read only

Former Member
0 Likes
439

hi,

chk this link.

[Removed by the moderator.]

Regards

Reshma