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

Table Locks

Former Member
0 Likes
681

Hi Folks,

I was wondering if a Insert stament releases db table locks. For example:

1. Lock DB Table ZXX1

2. Insert to DB Table ZXX2.

Does step 2 releases the lock set in the step 1?

Thanks for your help.

Kind Regards,

Gilberto Li

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
658

ABAP locks are logical, not physical, so if you use an ENQUEUE function to lock a table, table updates do not release the locks. You have to use a DEQUEUE function to release the lock.

And since they are logical, not physical, the database is not enforcing the locks. It's up to individual programs to set, check and release them.

Rob

Message was edited by:

Rob Burbank

5 REPLIES 5
Read only

Former Member
0 Likes
659

ABAP locks are logical, not physical, so if you use an ENQUEUE function to lock a table, table updates do not release the locks. You have to use a DEQUEUE function to release the lock.

And since they are logical, not physical, the database is not enforcing the locks. It's up to individual programs to set, check and release them.

Rob

Message was edited by:

Rob Burbank

Read only

0 Likes
658

Hi Rob,

Thanks for your reply.

Your answer makes sense.

Although i'm thinking if an Insert statement on ABAP is still logical and not physical and it becomes physical until a commit work. As a consequence of this, a Insert statement could release a lock?

Does this makes sense at all?

Regards,

Gilberto Li

Read only

0 Likes
658

Yes, I suppose it makes sense, but it's not the way ABAP works. The commit does not release the ABAP locks.

There will be physical locks at the database level, but we don't have much control over them.

Rob

Read only

0 Likes
658

Thanks Rob.

Regards,

Gilberto Li

Read only

0 Likes
658

Glad to help.

rob