Application Development and Automation 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: 
Read only

Row Level Locking while inserting a record.

Former Member
1,215

It is a good practice to lock the whole table or do the row level locking while performing any DELETE / UPDATE / MODIFY actions on a database table. Is it necessary to do the same thing while inserting a record via INSERT statement?

One point may arise if two users are inserting same records at a same time....

Well i am little bit confused here bcos if a record doen't exist in a table what is the point of locking it.

Please help me.

2 REPLIES 2
Read only

Former Member
0 Likes
503

create a lock object using SE11 for that perticular table and include field names in Lock parameters. Then it will generate two FMs one for locking and another for unlocking.

Call the lock FM before updating the table and pass that row key value(For fields which taken in lock parameters for creating lock objects) to the exporting parameters.

Then do the updation.

Reward if useful...................

Read only

0 Likes
503

Well Poorma, U are quite right about how to make a lock objects and how to use them, but my question is different here. I want to know that whether one should use row level locking while insertion or not.