10-19-2006 11:02 PM
Hi All,
I created 3 buttons SELECT ALL, DESELECT ALL and BLOCKREMOVE on the application toll bar using normal reporting. Can you please help me to write the case stmt for these buttons on the user command.
SELALL - All the check boxes before each line of output should be selected.
DESALL - All the check boxes before each line of output should be deselected.
REMOVE - selected deliveries with delivery block has to remove the delivery block.
Please Help me.
Thanks
Veni.
10-19-2006 11:06 PM
Assuming that CHECK is the field in your internal table which holds the value of the checkbox, you can do the following.
case sy-ucomm.
when 'SELALL'.
loop at itab.
itab-check = 'X'.
modify itab.
endloop.
when 'DESALL'.
loop at itab.
itab-check = space.
modify itab.
endloop.
when 'REMOVE'.
endcase.
Regards,
Rich Heilman
10-19-2006 11:04 PM
Hi,
CASE SY-UCOMM.
WHEN 'SELECTALL'.
....
WHEN 'DSELECTALL'.
.....
WHEN 'BLOCKREMOVE'.
ENDCASE.
Thanks,
Naren
10-19-2006 11:06 PM
Assuming that CHECK is the field in your internal table which holds the value of the checkbox, you can do the following.
case sy-ucomm.
when 'SELALL'.
loop at itab.
itab-check = 'X'.
modify itab.
endloop.
when 'DESALL'.
loop at itab.
itab-check = space.
modify itab.
endloop.
when 'REMOVE'.
endcase.
Regards,
Rich Heilman
10-19-2006 11:10 PM
Hi,
Try..Assuming checkbox is the field name for checkbox..
CASE SY-UCOMM.
WHEN 'SELECTALL'.
ITAB-CHECKBOX = 'X'.
MODIFY ITAB WHERE CHECKBOX IS INITIAL
TRANSPORTING CHECKBOX.
.
WHEN 'DSELECTALL'.
ITAB-CHECKBOX = ' '.
MODIFY ITAB WHERE CHECKBOX = 'X'
TRANSPORTING CHECKBOX.
WHEN 'BLOCKREMOVE'.
..
ENDCASE.
Thanks,
Naren