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

Release locks that have been set in one program from another program

Former Member
0 Likes
1,434

Hello All,

I have a requirement in which the user selects sales orders for updation from a report output and if any of those orders are locked by other users an error message is displayed for that order and the remaining orders are locked by the program using FM ENQUEUE_EVVBAKE so that no one can use that order.

The selected orders are then passed to another program using submit in which they are updated using call transaction.

I am unable to unlock the orders that have been locked in the first program so that they can be updated.

I appreciate your response in this regard.

Thanks in advance,

Ranjan

8 REPLIES 8
Read only

Former Member
0 Likes
1,277

Hi ,

I think you can use the FM DEQUEUE_EVVBAKE to unlock it.

Regards,

Pooja

Read only

Former Member
0 Likes
1,277

easiest way would be deque_all just before calling another program & again Enque imm in the second program.

Read only

Former Member
0 Likes
1,277

Hi,

Use FM 'DEQUEUE_ALL'.

Best regards,

Prashant

Read only

0 Likes
1,277

Hello All,

I have used the FM DEQUEUE_EVVBAKE and DEQUEUE_ALL in the second program but it does not release the locks that have been set in the first program.

Is there a condition that the locks set by a program can be released on by that program.

To unlock the orders in the first program and lock them again in the second program , the second program is submitted via background job so there might be a delay before it gets triggered and there is a chance that some user can lock that order in this time gap so that it cannot be updated.

Many thanks in advance,

Ranjan

Read only

0 Likes
1,277

you can not deque from another program.

deque in first program just before calling second program.

Read only

0 Likes
1,277

Hi

Use update Function Modules type V1 or V2 so that they will be carrid to the update function modules where you can process further.

Please go through the SAP LUW concept for the detailes info

Regards

Ramchander Rao.K

Read only

Former Member
0 Likes
1,277

Hello,

As you have used ENQUEUE_EVVBAKE in one program and want to do a dequeue process in another program you will need to do a DEQUEUE_EVVBAKE all in your other program as you do not know which value you have locked in other program. Dequeue all will unlock all the values. You can dequeue in Initialization event of the other program.

Thanks,

Jayant

Read only

Former Member
0 Likes
1,277

I think if user are different, lock set by one user cannot be released by another using DEQUEUE_ALL.

Please check before implementing it.

Regards,

Mohaiyuddin