Skip to Content
0
Former Member
Jun 18, 2006 at 10:05 PM

lock s are removed

106 Views

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.