Application Development and Automation 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: 
Read only

hi

Former Member
0 Likes
440

I need to insert single record into a custom table by looping std internal table.i used the code below,but it's not working...

loop at internaltable.

wa_internltable-field = internaltable-field.

endloop.

insert ztable from wa_internal table.

1 ACCEPTED SOLUTION
Read only

kostas_tsioubris
Contributor
0 Likes
420

Hi,

use modify instead of insert.

e.g.

modify ztable from wa_internaltable.

commit work.

Kostas

I need to insert single record into a custom table by looping std internal table.i used the code below,but it's not working...

loop at internaltable.

wa_internltable-field = internaltable-field.

endloop.

insert ztable from wa_internal table.

3 REPLIES 3
Read only

Former Member
0 Likes
420

HI,

Instead of insert statement, use append statement.

Hope this helps.

Reward if helpful.

Regards,

Sipra

Read only

Former Member
0 Likes
420

hi,

loop at itab_final into wa_final.

wa_final-matnr = wa_mara-matnr.

append wa_final to itab_final.

clear wa_final.

Reward with points if helpful.

Read only

kostas_tsioubris
Contributor
0 Likes
421

Hi,

use modify instead of insert.

e.g.

modify ztable from wa_internaltable.

commit work.

Kostas