02-02-2010 8:30 AM
Hello,
In table control i am providing a Select all icon, if the user selects the icon then
all the records in the table control has to be selected.
Plz let me know how can i do that .
Rgds,
karthi.
02-02-2010 8:44 AM
Hi,
In User Command Subroutine of PAI.
if OK_CODE = 'SELALL'.
Loop at Internal table (populated in Tab cntrl).
table-mark = 'X'.
modify table.
endloop
endif.
Then pass this table in the PBO.
Thanks & Regards,
Vamsi.
02-02-2010 8:35 AM
Do a recording in BDC and generate a program, see what OK code is being used for select all. Use the OK code statement from the generated program in your original program where it is required.
Do repond if it works fine.
Thanks,
Navita
02-02-2010 8:44 AM
Hi,
In User Command Subroutine of PAI.
if OK_CODE = 'SELALL'.
Loop at Internal table (populated in Tab cntrl).
table-mark = 'X'.
modify table.
endloop
endif.
Then pass this table in the PBO.
Thanks & Regards,
Vamsi.
02-02-2010 8:53 AM
hi,
WHEN 'ALL'.
LOOP AT I_ITAB.
I_ITAB-SEL_COM = 'X'.
MODIFY I_ITAB.
ENDLOOP.
n in the layout check w/selcolumn for the table control.
02-02-2010 8:48 AM
Hi,
When you click on that button, there will be one field in table ctrl ATTRIBUTES to make row as selected( I did not rember that).So loop at TCTRL and make that filed 'X' for each record and modify the table ctrl, then it will work.
Hope this will help you.
Thanks and Regards,
Narendra.Somarouthu
02-02-2010 8:48 AM
in the internal table create a field 'SEL'.
Then in table control screen properties set the 'with selection column multiple option' and give this field name 'WA-SEL'.
Now when the icon is clicked.
in pbo.
LOOP WITH CONTROL tab_con.
MODULE fill_tab_con.
ENDLOOP.
module fill_tab_con.
READ TABLE itab into wa INDEX tab_con-CURRENT_LINE
endmodule.
in PAI.
if sy-ucomm = 'ALL'.
loop at itab into wa1.
wa1-sel = 'X'.
modify itab from wa1 transporting sel where sel = space.
endloop.
endif.