on 07-31-2007 10:11 AM
Hi,
I have a list. In that list I have checkboxes corresponding to the rows of internal table. I also have a select all button. I want to check all the checkboxes at select all button click,
Please guide me.
Thanks,
Saroj
You will have to write similar code on user command of select all. Just check the position of X in list and change 'my_lisel+1(1)' accordingly
do.
read line sy-index field value input_entry.
if sy-subrc ne 0.
exit.
endif.
read line sy-index field value sy-lisel into my_lisel.
if my_lisel+1(1) = ' ' and my_lisel+1(1) ne '-'
and sy-index ne 1
and sy-index ne 3.
my_lisel+1(1) = 'X'.
modify line sy-index field value sy-lisel from my_lisel.
endif.
enddo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should perhaps consider using the REUSE_ALV_LIST_DISPLAY function to produce your report. it can be set to include checkboxes on each line and comes with automatic select all, deselect all, sort, filter, etc functionality. This is a lot easier than writing such code yourself, and while it may be a bit slower the first report you write, once you are used to ALV you will find yourself saving 50% of the time on each report.
There are lots of posts and sample code available on using ALV.
Andrew
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
For checking all checkboxes whenever u click on select all button u have to modify the field value of the checkbox field in the internal table.
First u must assign a function code to select all button.
U must handle this select all functionality in the at user-command event. When ever user click on the select all button control triggers at user-command event. In that u have to handle the function code. When ever user clicks on select all field value of the check box in the internal table must be modified to 'X'.
Regards,
Sankar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.