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

Modify Dbtab

Former Member
0 Likes
438

Hi Experts,

Is there a possibility that below modify statement will update/insert more than one line in the table?

loop at i_itab6 into wk_itab6.

delete from zarmmmt0005 where EKORG = wk_itab6-ekorg

AND LIFNR = wk_itab6-lifnr

AND MATNR = wk_itab6-matnr

AND KSCHL = wk_itab6-kschl

AND FISCPER = wk_itab6-fiscper

And FISCVAR = wk_itab6-fiscvar.

MOVE-CORRESPONDING wk_itab6 TO zarmmmt0005.

modify zarmmmt0005 .

endloop.

Thanks,

Apps

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
406

Hi ,

You are moving workarea to ZARMMMT005 so only one record will updated or inserted.

MOVE-CORRESPONDING wk_itab6 TO zarmmmt0005.

For more than one line

modify zarmmmt0005 from i_itab6 .

This is will update/insert more than after your validations are done.

delete zarmmmt0005 from i_itab6. then you the below statement.

modify zarmmmt0005 from i_itab6 .

2 REPLIES 2
Read only

Former Member
0 Likes
406

Hi,

It will just delete record from the table first based on condition.

and again insert/modify into same table.

Read only

Former Member
0 Likes
407

Hi ,

You are moving workarea to ZARMMMT005 so only one record will updated or inserted.

MOVE-CORRESPONDING wk_itab6 TO zarmmmt0005.

For more than one line

modify zarmmmt0005 from i_itab6 .

This is will update/insert more than after your validations are done.

delete zarmmmt0005 from i_itab6. then you the below statement.

modify zarmmmt0005 from i_itab6 .