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

enque process.

Former Member
0 Likes
340

hi,

I came across below statment...

"Select single * for update v/s Enqueue.

Avoid locking database records with statement selectu2026..update. A better solution is to use enqueue."

so basically i want to understand how this enqueue process will function so that there will not be performance bottleneck

Regards,

Santosh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
309

Hi Santosh,

the statement SELECT SINGLE ... FOR UPDATE basically creates a database lock. The ENQUEUE functions offered by SAP are logical locks that group updates into so called LUW's (Logical Unit of Work). So the ENQUEUE function is not actually locking anything , it's more an indicator that the application is processing some data. In theory any other process could change the same data at the same time, but this is prevented by application logic, which always tries to acquire the lock on the object it tries to change (though sometimes you see custom programs without locking logic, which then creates those hard to find mysterious update problems).

Cheers, harald

1 REPLY 1
Read only

Former Member
0 Likes
310

Hi Santosh,

the statement SELECT SINGLE ... FOR UPDATE basically creates a database lock. The ENQUEUE functions offered by SAP are logical locks that group updates into so called LUW's (Logical Unit of Work). So the ENQUEUE function is not actually locking anything , it's more an indicator that the application is processing some data. In theory any other process could change the same data at the same time, but this is prevented by application logic, which always tries to acquire the lock on the object it tries to change (though sometimes you see custom programs without locking logic, which then creates those hard to find mysterious update problems).

Cheers, harald