‎2008 Oct 02 6:05 AM
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
‎2008 Oct 02 6:14 AM
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 .
‎2008 Oct 02 6:14 AM
Hi,
It will just delete record from the table first based on condition.
and again insert/modify into same table.
‎2008 Oct 02 6:14 AM
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 .