06-04-2008 8:29 AM
Hi Guru's,
I wanted to know which is the best way to update the database table entries from performance point of view?
Using MODIFY is it a performance issue ?
Regards ,
Praveen
06-04-2008 9:10 AM
yes!
The fastest way are array update.
So you should try to determine what must be updated and what must be inserted.
Then do
insert db_tab from table itab_ins.
update db_tab from table itab_upd.
Modify is more convenient, but line-oriented. Useful for small number of updates.
For very large numbers of update you should plan a commit after about 10.000 records. Take care that the data remain consistent.
Siegfried
06-04-2008 9:48 AM
Hi Siegfried Boes ,
I am replacing the old profit center of order number with new one using modify statement and i am using commit work after that .
I heard that using the Modify statement for Db table will not be good instead we should look for some FM to update .
Please can u suggest me what are negative points for using MODIFY statement from performance point of view .
Regards ,
Pravee
06-04-2008 10:01 AM
Hi,
1. Create FM for Update The Data
- Processing Type = Update
2. Call FM from 1.
- Addition parameter "IN UPDATE TASK"
- Pass Data
3. after that COMMIT WORK
06-04-2008 11:00 AM
hi...
Insert table.
this is the bests way from performance point of view as well.
It will directly insert entries in the table and will give a dump in case of duplicate entires
06-05-2008 9:31 AM
Hi,
If it is a standard SAP table you should use BAPI or BDC.
For a Z table, update is better than modify statement from performance perspective. Modify will check first and then do insert or update, so it's an extra work.
-Regards
Ashim
06-05-2008 9:58 AM
is it so difficult to understand my answer,
modify tries to update and if the record is not there then it inserts one.
For mass changes it is better to determine, what must be updated and what inserted and do it separately with 'update/insert dbtab from itab'.