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

SAP Lock (Enqueue Lock)

Former Member
0 Likes
674

Hi there,

I have used SAP Enqueue and Dequeue Lock in my program. However, it does not seems to work. Do I need to have a specific authorisation in order to be able to perform Enqueuing n Dequeuing?

In addition, when i perform CALL FUNCTION 'ENQUEUE_XXXXXX', what does the return code, sy-subrc = 4 signifies?

Thank You.

3 REPLIES 3
Read only

Former Member
0 Likes
512

For sy-subrc = 4 U need to check the Exceptions declared in FM

'ENQUEUE_XXXXXX' .

check 4th exception in the FM ..

Read only

Sm1tje
Active Contributor
0 Likes
512

locking failed if sy-subrc = 4. Check your function module exceptions and see what fourth exception is. maybe object is already locked and you can't lock it again.

Read only

Former Member
0 Likes
512

Use transaction SM12 to see if you already have any locks. Also worth checking the data you are trying to lock is actually on your database table.

Gareth.