10-04-2016 10:54 AM
Hi Experts,
I am facing one issue with update of large number of records in custom table.
I am using update statement inside loop of 50K records and than after loop is completed commit work and wait.
Want to know what is best practice to update bulk record of internal table in custom table and does it create any table level lock.
Regards,
Aditya
10-04-2016 11:13 AM
Use the "FROM TABLE ..." addition of the "UPDATE" statement to update your custom table.
Have a look at the documentation UPDATE dbtab - source - ABAP Keyword Documentation
Edit: I think the first example in provided link does address your problem.
10-04-2016 11:13 AM
Use the "FROM TABLE ..." addition of the "UPDATE" statement to update your custom table.
Have a look at the documentation UPDATE dbtab - source - ABAP Keyword Documentation
Edit: I think the first example in provided link does address your problem.
10-04-2016 2:07 PM
Thanks Andre. so i will be updating from table at a time. How can i update specific fields of data base table with fields of internal table.
10-04-2016 3:37 PM
There are a lot of ways to do that. So this is also a very Basic question.
Maybe you should post your code snippet here, so that we can help you in a more specific way.
10-04-2016 5:33 PM
To my knowledge it is not possible to update specific fields of data base table (till 731 - 013). I am not sure whether there is any newer version which allows this.
-Chandra
10-05-2016 3:36 AM
It's possible to update specific fields by creating a DDIC Projection View with only the fields to be updated (+ read/write mode of course). But this is only to be reserved to specific mass updates which are really too slow, otherwise the DDIC would be a mess if "dummy" views are created for all updates!