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: 

lock s are removed

Former Member
0 Kudos

hi,

please bear with my explanation.

I have a cutom transaction like vl02n.

Once we are inside the transaction(1) I set locks on all the related orders and also the delivery itself afer my initial validations.

Now on SAVE ,i have a BAPI inside my transaction(1) to change sales orders(which I already locked).

What happens inside this BAPI is , there is a routine BELEG_INIT*** where it calls the 'DEQUEUE_ALL' and this deletes all locks.(checked in sm12 also).

Now iam in debug and I open a parallel session and open my custom transaction(2) for the same delivery.i get the message 'Sales order xxx is currently being processed by myself' which is great. But just after the BAPI_TRANSACTION_COMMIT IN '1' i loose that lock also(the order).

Now I try again and can get into the transaction(2) parallely while still in the debug mode(1) for the same delivery.

But if i try to save after any change(2) i get the error message thAT it is locked which is fantastic.

But my requirement is:

I do not want users to be able to get inside at all in my custom transaction for the same delivery. The locks work anytime except when the user hits save and my logic goes inside the BAPI as i have explained above.

Is there a way i can accomplish this.

sorry if not clear. i can go over it if any questions.

I would greatly appreciate any feedback.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

Try using Exclusive Locks. This will not allow the user to even display the order or delivery. Try calling explicitly a Exclusive lock.

Good luck

Cheers

VJ

5 REPLIES 5

Former Member
0 Kudos

Hi

Try using Exclusive Locks. This will not allow the user to even display the order or delivery. Try calling explicitly a Exclusive lock.

Good luck

Cheers

VJ

0 Kudos

that s what i was using. 'E'.

Former Member
0 Kudos

Hi KP,

Check if this will work for you. You create a lock on Table LIKP(Delivery Header) by activating a lock on table through SE11 txn. This will create Func. Module ENQUEUE_Tablename which you can call at the start of custom transaction and release the lock on it by calling DEQUEUE_Tablename after saving the delivery through BAPI.

Hope this will give you some idea!!

Cheers,

Vikram

Pls reward for helpful replies!!

Former Member
0 Kudos

Hi KP,

Check if this will work for you. You create a lock on Table LIKP(Delivery Header) by activating a lock on table through SE11 txn. This will create Func. Module ENQUEUE_Tablename which you can call at the start of custom transaction and release the lock on it by calling DEQUEUE_Tablename after saving the delivery through BAPI.

Hope this will give you some idea!!

Cheers,

Vikram

Pls reward for helpful replies!!

Former Member
0 Kudos

Hi KP,

I am facing the same issue as you. The locks are being released whenever a commit work is executed after call to a bapi. Did you figure out a solution for this?

Thanks,

Tessy