Application Development 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: 

How to use commit work as per the requirement?

Former Member
0 Kudos

Hi all,

Here i have a requirement about database table updation. I have to update a database table, at the time of doing commit work it has to check the following condition .

The data should be split up in different groups or records of no more than 2000 after which a commit to the database is executed.

So can anybody help me in this regard with a piece of code? and i want to know during updation how to lock the data base table and how to unlock? Is there any standard function modules to call regarding this locking and unlocking?

Thanks & Regards

Naidu

2 REPLIES 2

Former Member
0 Kudos

which table is that? and do you have any code so far?

Logically you need to loop thru your records, lock the table for that record, update the table , unlock the tabel record, count the entires so far, andi f it is 2000 issue commit work.

matt
Active Contributor
0 Kudos

Looks like you need to read the SAP Help about the SAP Locking Concept - enqueue and dequeue.

matt