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

Multiple Selection in ALV grid

Former Member
0 Likes
785

HI All,

I am displaying output using ALV grid method. On screen i am selecting multiple rows & based on selection i want process further. How can i determine whcih rows user has selected ?

Regards,

Rahul

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
727

Hi Rahul,

you can use the event " HANDLE_DATA_CHANGED".

In this you can fetch the selected fields form the ALV Grid.

Hope this helps.

Regards,

Chitra

HI All,

I am displaying output using ALV grid method. On screen i am selecting multiple rows & based on selection i want process further. How can i determine whcih rows user has selected ?

Regards,

Rahul

4 REPLIES 4
Read only

Former Member
0 Likes
728

Hi Rahul,

you can use the event " HANDLE_DATA_CHANGED".

In this you can fetch the selected fields form the ALV Grid.

Hope this helps.

Regards,

Chitra

Read only

Former Member
0 Likes
727

Hi,

In IT_FIELDCAT you can pass one field with attributes of check box.

for example.

Declare:

DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,

FIELDCAT_LN LIKE LINE OF GT_FIELDCAT.

Pass the below values.

FIELDCAT_LN-FIELDNAME = 'CHECK'.

FIELDCAT_LN-TABNAME = 'ITAB1'.

FIELDCAT_LN-KEY = ' '. "SUBTOTAL KEY

FIELDCAT_LN-NO_OUT = ' '.

FIELDCAT_LN-SELTEXT_L = 'Check Box'.

FIELDCAT_LN-CHECK-BOX = 'X'.

APPEND FIELDCAT_LN TO GT_FIELDCAT.

<b>rEWARD IF USEFULL</b>

Read only

Former Member
0 Likes
727

Hi,

Use the Method <b>GET_SELECTED_ROWS_BASE</b> in Class <b>CL_GUI_ALV_GRID</b>.

Regards,

Padmam.

Read only

Former Member
0 Likes
727

Try method GET_SELECTED_ROWS of class CL_GUI_ALV_GRID

Regards.