12-28-2007 10:05 AM
hi
there is a list of 10 records in the output screen with check boxes. if the user select any 3 records then those records should get appended in some other internal table of same structure.
this is the requirement. can anybody help me it is very urgent.
regards
sami
12-28-2007 10:15 AM
Hi,
Loop at the internal table which contains the value in table control and move it to a work area. apend the work area to the next internal table. Like:
loop at it1 into wa1 where sel = 'X'.
append wa1 to it2.
endloop.
or
loop at it1 into wa1.
if wa1-sel = 'X'.
append wa1 to it2.
endif.
endloop.
Regards,
RM
12-28-2007 10:15 AM
DO no.of records in itab times.
READ LINE sy-index FIELD VALUE gv_chk.
if gv_chk = 'X'.
append itab values into new itab.
This statement helps u.
The line displayed on the report is read and the check box status is read into gv_chk.
Then
Awrd Points if useful
Bhupal
12-28-2007 10:39 AM
Hi
In the PAI of your screen, call the method GET_SELECTED_ROWS. This will populate an Internal table (say T_ROWS) with the index of the rows selected. Now loop this Internal table and for each loop read the corresponding record from the ouptput table (Screen) and append the final table.
Thanks
Sharath.
12-28-2007 11:06 AM
Hi,
You can do as below :
loop at gt_output where flag = 'X'.
move : gt_output to gt_newtab.
append gt_newtab.
clear gt_newtab.
endloop.
Thanks,
Sriram Ponna.