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: 

Problem with LOCK in Transaction MBRL

Former Member
0 Kudos

Hi All,

Greetings!!

I have a problem with locks in T. Code MBRL.

The problem is as follows:

I am creating Reverse Delivery through T.Code MBRL, using Material Doc No. I did recording on this tcode and calling this in loop for creating more than 1 deliveries using Call Transaction.

Inside this T.Code its using a FM "ME_READ_ITEM_GOODS_RECEIPT" which locks the Purchasing Doc and its Item. For the first record its working fine, when next record comes with same Mat Doc No & P O Number, then its displays error message that PO is lock by user(my userid).

Can anybody guide how to unlock the tcode for smooth execution of the program.

I have tried FMs like GN_DELIVERY_CREATE but it requires lot of other data which i dont have in my problem.

Thanks n Regards

11 REPLIES 11

Former Member
0 Kudos

Hi,

Before the Function Module Call, Check if the PO is Locked....if yes.....Unlock the PO.....

Anyway....this FM's should work for all the PO Lines Items in one go......try t build the logic like that only....

0 Kudos

I am not using the FM to release the PO lock.

Its inside the T.Code MBRL its using that FM.

Former Member
0 Kudos

Although the transaction you are calling probably unlocked the records you are updating, the locks have probably not entirely released by the time the second transaction is called.

Try locking the record yourself after each call to the transaction and specify:

_WAIT  = 'X'

Then unlock it.

Rob

0 Kudos

Thanks for you inputs

Where I have to Specify wait = 'X'.? and how should i lock the record by myself?

u mean should i call the FM "transaction_commit."?

0 Kudos

after call transaction 'MBRL'

i am already using

commit work.

call function dequeue_all.

wait up to 2 seconds.

but this is not working.

Thanks

0 Kudos

I would try to find which FM is locking the record initially and call it.

No not transaction_commit.

Rob

0 Kudos

FM "ME_READ_ITEM_GOODS_RECEIPT" is locking the PO inside the Standard T.Code MBRL.

how can i unlock it from my Z-Program?

Thanks

0 Kudos

No - there should be a FM that starts with ENQUEUE...

Maybe ENQUEUE_MATERIAL

Rob

Edited by: Rob Burbank on Oct 16, 2008 4:46 PM

0 Kudos

Hi,

I had the same issue with FM "ME_READ_ITEM_GOODS_RECEIPT" and T-Code MB04. It was solved by using "commit work" after calling the function and before call transaction.

Former Member
0 Kudos

Hi,

I suppose you are using CALL TRANSACTION 'xxxx' USING BDCDATA...to do the reverse delivery...

What is the value that you are passing in the UPDATE addition of call transaction..?

Try passing S (Synchronous processing) to the update addition..

Ex..

CALL TRANSACTION 'XXXX' USING T_BDCDATA UPDATE 'S'..

Thanks

Naren

Former Member
0 Kudos

solved with bapi transaction commit