Application Development 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: 

question about Lock Duration

Former Member
0 Kudos

Hi,

I found a description at this link.

http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4c5a79e11d1950f0000e82de14a/content.htm

'At the end of an SAP LUW, you should release all locks. This either happens automatically during the database update, or explicitly, when you call the corresponding dequeue function module. Locks that are not linked to a database update are released at the end of the SAP transaction'

I don't understand this, because I tested using commit work and wait. The lock entry still there after the statement 'commit' executed. the lock entry disappeared when the whole task completed.

don't know what does happens automatically during the database update. Isn't the 'commit' the case they mentioned?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hai,

Commit statement does not release lock even if use it with wait.

You need to use DEQUEUE_ALL function module to release locks.

3 REPLIES 3

Former Member
0 Kudos

Hai,

Commit statement does not release lock even if use it with wait.

You need to use DEQUEUE_ALL function module to release locks.

matt
Active Contributor
0 Kudos

The automatically bit refers to when updates are done in the update task.

matt

Former Member
0 Kudos

So does that means even I using a SYNCHRONIZE commit. There still not a database update happen?

From help.sap.com:

For 'commit work' "It triggers a database commit that also terminates the current database LUW and closes all database cursors. "

Database commit <> database update ?