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

Locking multiple records in a database table at a time

Hi Experts,

I have a requirement to lock multiple records in the database table for writing. I have created lock object in SE11. But with this we have only 2 possibilities either lock entire table or lock a single record at a time.

My requirement is, i have table with key field PROJECTID. I want more than one project to be locked, but not the complete table. I dont have any other field in the table to compare.

Thanks in advance..

Regards,

Asrar

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Posted on Feb 18, 2009 at 01:42 PM

    Hi welcome to SCN...

    in su21 you can add some more data elements in the same Authorization object..

    J@Y

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 18, 2009 at 01:45 PM

    My objective is not with authorization objects. I cant fix values for locking.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 18, 2009 at 08:29 PM

    Hi,

    Try with FOR UPDATE in the SELECT sentence.

    SELECT FOR UPDATE *

    INTO Internal_Table

    FROM Table

    WHERE Conditions.

    This sentence blocks the records that satisfy of the WHERE conditions.

    Regards,

    José

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 13, 2009 at 07:13 AM

    I have used to lock the compolete table, and implemented the required logic in the program so that users did not get locking errors.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2009 at 07:39 PM

    Hi ,

    Try with FOR UPDATE in the SELECT sentence.

    SELECT FOR UPDATE *

    INTO Internal_Table

    FROM Table

    WHERE Conditions.

    UPDATE "Table_name" FROM TABLE Internal_Table.

    COMMIT WORK.

    This sentence blocks only the records that satisfy of the WHERE conditions (not the entire table) and unlocks after commit work.

    Hope this information is help to you.

    Regards,

    José

    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.