Skip to Content
avatar image
Former Member

Problem with LOCK in Transaction MBRL

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Oct 16, 2008 at 07: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....

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 16, 2008 at 07: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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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.

  • avatar image
    Former Member
    Oct 16, 2008 at 09: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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 07, 2009 at 07:53 PM

    solved with bapi transaction commit

    Add comment
    10|10000 characters needed characters exceeded