05-28-2007 7:57 AM
please tell me how to copy complete internal table into main dababase table by overwriting all the entries of the main DBtable.
05-28-2007 7:59 AM
Hi Karan,
If you are modifying the existing entries then use MODIFY statement, but if you want to delete earlier entries and insert the new one then you have to first use DELETE and then eithe INSERT or UPDATE statement.
Reward points if useful.
Regards,
Atish
05-28-2007 8:00 AM
hi,
Use <b>Modify</b> statement.
i.e,
MODIFY dbtab FROM TABLE itab.
Refer
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/modify.htm.
Message was edited by:
Santosh Kumar Patha
05-28-2007 8:01 AM
05-28-2007 8:02 AM
HI,
you can use<b> Insert Or Modify statement ..</b>
<b>Modify updates the existing record, insert creates a new one. ...</b>
insert ZDBTAB from table itab.
Modify ZDBTAB from table Itab.
The structure of itab should be exactly the same as the z table.
You should not update standard tables directly though.
rewards if usefuyl
regards,
nazeer
05-28-2007 9:46 AM
The follwing command overwrites the all entries.
UPDATE DBTAB FROM TABLE ITAB.
For this action the internal table should contain all the key field values.