2009 Feb 18 1:35 PM
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
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
2009 Feb 18 1:42 PM
Hi welcome to SCN...
in su21 you can add some more data elements in the same Authorization object..
J@Y
2009 Feb 18 1:45 PM
My objective is not with authorization objects. I cant fix values for locking.
2009 Feb 18 1:59 PM
you might have SAP_ALL access.. so you cannot test if its locking or not.....
AUTHORITY-CHECK OBJECT Hit F1 on this and find more info..
2009 Feb 18 8: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é
2009 Mar 13 7: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.
2009 Sep 08 8: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é