Application Development 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: 

select/deselect all in alv using SALV classes

Former Member
0 Kudos

Hi All,

Is it possible to have select/deselect all functionlaity in alv using SALV classes.

Once i select all and click on another button in the status bar it should update some records in the database.

Select/deselect all is an editing functionality so I am not sure whether this is possible in SALV or not.

Please let me know your thoughts on this

Thanks

Bala Duvvuri

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I have not tried with SALV, but this is very easy to do as OO ALV....  I added the Sel all, Desel All as function buttons, and when the user presses one I loop at the internal table and set my value in the column as 'X' or space as needed....

Why not try this in SALV, and see if you can't achieve the same results by modifying the internal table, and calling the refresh method?   I don't see a reason why it would not work.

While SALV is intended to not be editable, one can achieve edited results....by allowing a person to choose a row and press a function button.  Then popup a screen, accept the user's input, replace the data into the correct row of the display table and call the refresh method....  goes right around the "not editable" constraints.

2 REPLIES 2

Former Member
0 Kudos

I have not tried with SALV, but this is very easy to do as OO ALV....  I added the Sel all, Desel All as function buttons, and when the user presses one I loop at the internal table and set my value in the column as 'X' or space as needed....

Why not try this in SALV, and see if you can't achieve the same results by modifying the internal table, and calling the refresh method?   I don't see a reason why it would not work.

While SALV is intended to not be editable, one can achieve edited results....by allowing a person to choose a row and press a function button.  Then popup a screen, accept the user's input, replace the data into the correct row of the display table and call the refresh method....  goes right around the "not editable" constraints.

0 Kudos

problem is solved

I created a custom status with custom button for select all and created an event

WHEN 'ALL'.
       IF <lfs_edit> IS ASSIGNED.
         UNASSIGN <lfs_edit>.
       ENDIF.
       LOOP AT wt_edit1 ASSIGNING <lfs_edit>.
         <lfs_edit>-select = 'X'.
       ENDLOOP.
       wwo_alv_table->refresh( ).

Thanks

Bala Duvvuri