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: 

selecting multiple records from the list and append it into internal table.

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.