Skip to Content
author's profile photo Former Member
Former Member

How to use commit work as per the requirement?

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 09, 2008 at 01:14 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 09, 2008 at 02:56 PM

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

    matt

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.