10-16-2008 8:32 PM
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
10-16-2008 8:36 PM
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....
10-16-2008 9:33 PM
I am not using the FM to release the PO lock.
Its inside the T.Code MBRL its using that FM.
10-16-2008 8:41 PM
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
10-16-2008 9:36 PM
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."?
10-16-2008 9:37 PM
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
10-16-2008 9:38 PM
I would try to find which FM is locking the record initially and call it.
No not transaction_commit.
Rob
10-16-2008 9:41 PM
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
10-16-2008 9:44 PM
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
12-17-2008 4:34 AM
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.
10-16-2008 10:06 PM
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
05-07-2009 8:53 PM