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: 

logic for select all and deselect all in table control

Former Member
0 Kudos

HI,

Can any body say how to write logic for select all' push button while using in table control.

my table control each row contain push button . while click on select all' push button , it should select all rows and while click on 'deselect all' it deselect all row (As like in VA01 or VL01N) .

Regards

2 REPLIES 2

naimesh_patel
Active Contributor
0 Kudos

You have to set 'X' to your row selection field if SelectAll has been pressed and if the Deselect All has pressed, than you have to clear the selection field value in the PAI


CASE SY-UCOMM.
  WHEN 'SELALL'.
     ITAB-SELECT = 'X'.   "  seletion field on table control
     MODIFY ITAB TRANSPORTING SELECT WHERE SELECT IS INITIAL.
  WHEN 'DESALL'.
    ITAB-SELECT = SPACE.
     MODIFY ITAB TRANSPORTING SELECT WHERE SELECT = 'X'.
 ENDCASE.

Regards,

Naimesh Patel

Former Member
0 Kudos

s