How to unlock material and batch at MIGO

hi all,
My requirement is to post another transaction using BAPI_GOODSMVT_CREATE at MIGO in the background.
let say after posting movement type 101..i have to post another transaction of same material in same plant and in same Batch Using BADI,
The problem is, material and batch name were currently lock by movement type 101, So BAPI giving Error that Batch BHEL001 of material 1000000000004 is already locked by user01. i.e. from my ID.
Is it possible to remove this lock object?
These are the lock objects at SM12.
E     MCH1     11000000100000000000400000XXXXX     0     1
E     MCH1     11000000100000000000470206XXXXX     0     1
I tried
CALL FUNCTION 'DEQUEUE_EMMCH1E'
'DEQUEUE_all'
i don’t want to consider the wait options..
My problem is to remove  lock objects in order to transact another movement type
thanks for your responce..
Pankaj

Hey,
I can think of something like this..
*Read all the lock details in system
CALL FUNCTION 'ENQUE_READ2'
  EXPORTING
    gclient = sy-mandt
    gname   = ' '
    guname  = '*'
  TABLES
    enq     = lt_enq_read.
*We will search entry for table level lock for our table
LOOP AT lt_enq_read INTO lw_enq_read
WHERE gname EQ 'RSTABLE'
AND   garg CS 'ZTEST_SHUKS3'.
  MOVE-CORRESPONDING lw_enq_read TO lw_enq_del.
  APPEND lw_enq_del TO lt_enq_del.
ENDLOOP.
*Delete table level lock entry for our table
CALL FUNCTION 'ENQUE_DELETE'
  EXPORTING
    check_upd_requests = 1
  IMPORTING
    subrc              = lv_subrc
  TABLES
    enq                = lt_enq_del.
You should first search for lock and manually delete them using above FM.
Hope it helps
Thanks,
Nitin

Similar Messages

  • Find material and batch based on batch characteristic name

    Hi,
    I need to fetch all material and batch that have a particular batch characteristic. Can someone let me know how i can establish this link. I only have a characteristic name with me, need to find batches that use them.
    Thanks & Regards,
    Naresh.

    HJi
    Try table MCHA.
    Pushpraj

  • Tables for production order number for material and Batch combination

    Dear Experts,
    Please suggest the table names for finding the production order for material and batch combination .
    Thanks in advance for your help...
    Best regards
    Nitishj

    Dear
    Please check in  AFPO-CHARG
    AFPO          Order Item Detail -Batch Number -CHARG
    AFFW         Confirmations -- Goods Movements w
    AFRD          Confirmations -- Defaults for Collective Confirmation
    AFRH          Confirmations -- Header Info for Confirmation
    Regards
    JH

  • How to find material and vendor combination which has freight conditions?

    Hi Please help me, its very urgent.
    How to find material and vendor combination which has freight conditions?
    Waiting for your help.
    Regards,
    Marella.

    Hi marella,
    Try MEKA transaction.
    Gopi

  • Created batch material  and made po, migo,miro now change to non batch.

    Hi All.
    I have created Batch Material mm01 with  batch management check box.
    Created PO and donetransaction of  migo, miro.
    Now i want to change to non batch material.
    i like to remove batch management check box in mm02
    Regards.
    Parameshwar.
    Edited by: Csaba Szommer on Jul 7, 2011 9:23 PM

    Thanks Kunal.
    I will Click on display errors  for the list of open documents.
    Then i will clear all documents.
    Next I will change MM02 by removing Check box to normal material
    It should work for me.
    My Doubt is after this also i need to run the program to change to non batch material.
    Clarify me about program running.
    Regards.
    Parameshwar.
    Thanks MM dudes.

  • How to put material and service in the same order

    I want to put the material and service in the same order. How do it input different taxes. and also migo for one material item and other service item.

    HI,
    In your scenario create material and service PO using T-code ME21N as follows.
    1) Select PO document type, vendor and PO date
    2) PO first line item account assignment 'N' if project and give input data material code,plant,storage location,qty,rate,delivery date and tax code.
    3) PO second line item account assignment 'K', item category 'D',material short text for service, plant,storage location,material group data's are input given and press enter it will open 'Service Tab' in Item Detail Menu.
    4) In item Detail Menu - Service tab you will give Service no.,qty,gross price for the above  service material activity and service tax code in Invoice TAB and then check PO and SAVE.
    5) After getting PO approved by top management.
    6) PO first line item, you will do MIGO and PO second line item you will do ML81N service entry sheet.
    7) On the vendor bill, you will mention material document number (GRN no.) & Service sheet number and given to accounts dept.. They will book vendor bill and give payment.
    Hope, it is useful for you and solve your requirement.
    Regards,
    K.Rajendran

  • How to unlock material in SAP?

    Hello everbody:
    I want to know how to unlock some material, before of that I have entered to the transaction mm06 for locking my material in some centers and warehouses.
    Thanks.

    Hi Robert,
    SM12 is the Tcode used to handle lock object's which are already opened  by a User, but to unlock a material we can do it using MM06 or MM02 also .
    Refer the below link for SM12 lock objects :
    SM12 - Unlocking an ABAP (TADIR) Object
    Regards,
    Lokeswar.

  • Problems in having common material and batch in different plants

    Hi all,
    As the material with the same batch is existing in different plants, we are facing some problems in processing the Process Messages.
    If some user who belongs to a different plant is processing the batch for the material, the Process messages are not being sent the destination as we get an error message that the reservation is currently processed by user (who actually belongs to a different plant). This is effecting the Business.
    Can anyone tell me how we can prevent this? Could the reservation and Batch status set as plant level control via standard IMG change ?
    Regards,
    Brijesh

    Yes Rajanikanth,
    But can you please let me know whether it is not possible to restrict this so that the batch processed in different plants should not affect in our plant?
    Thanks.
    Regards,
    Brijesh

  • Valuation Type is missing for Material and Batch

    Hi Experts,
    I am facing issue related to delivery.
    While creating Order to cash cycle for one sales area, there is no error at all, but when I am trying to repeat the same cycle with same customer and material, different sales area and document type, I am not able to save delivery document. and receive error as "Valuation Type is missing for Material X and Batch Y".
    Kindly suggest possible errors.
    Regards,
    Himmanshu

    Check whether the required Valuation type is maintained in material master.  Also, update the error message number.
    G. Lakshmipathi

  • How to get material and plant by providing control key as input ?

    How to get the material and plant info based on control key values using a function module?
    kindly help..

    Hi,
    Check the FM
    K_VALID_PLANTS_OF_MATERIAL.
    Sandeep Kaushik

  • How i unlock carrier and find my current carrier

    I have iPhone 5 which send my friend from USA and i am using it in Pakistan,when i insert sim in this phone and after processing comes "SIM Not Valid error.And iPhone be unlocked by your carrier.please contact applce for more information".please tell me how i fix this problem and how i check carrier of this phone

    thanks for quick response.
    can you give me the email or phone no. of apple care.my friend is not known he is forget .Please tell me any other way to activate it.or please tell me the procedure how to bypass network and used it like ipod.Thanks

  • Material and batch characteristics

    Hi All..
    For the material and the batch i want to retrieve the material characteristics and the batch characteristics.
    Are there any function modules or bapi's available to achieve this..
    Appreciate your help and will reward the helpful.

    Hi
    Try  BAPI_MATERIAL_GETLIST
    BAPI_MATERIAL_GET_DETAIL
    reward points if helpful
    Regards
    Srikanta Gope

  • Inspection lot summary when GR post to same material and batch

    Dear Experts,
    The business flow is, when material with same batch number come to plant, this batch may split and post to different storage location.
    we have tried setting control inslot parameter to "2 For each material batch and storage location" but it only work within one storage location.
    can any expert suggest idea about this thing, thanks a lot.

    You'll only be able to stop the second lot from being created.  You won't be able to update an open, existing inspection lot because of the different storage location.  SAP can't have two segments of inventory linked to the same insp. Lot.
    Are you using batch status at your plant? As an alternative, you could create the batches with a restricted batch status.  Then the whole batch, regardless of storage location shows as restricted stock.  Use the user exit to prevent creation of additional insp lots.  When the first insp lot is completed, the batch status can be changed via the UD stock posting to unrestricted stock.  When this happens, all stock of the batch in all other storage locations will change to unrestricted stock.
    FF

  • How to unlock ALEREMOTE and reupload 0COORDER

    HI,
    I have come up with this issue -User ALEREMOTE locked the load of master data for characteristic 0COORDER RSDMD 174.
    Please provide the solutions with clear steps to be performed.
    Thanks,

    Please follow the <a href="http://help.sap.com/bp_bblibrary/500/documentation/U46_BB_ConfigGuide_EN_ZH.doc">document</a> which was given by Google.
    This should help you to discover the right topic to post your question at least.
    Suppose your issue is connected with BW and/or BI
    HTH

  • How to Unlock Batch/Material in my code?

    I would like to unlock this batch/material in the system at runtime. The problem evolves from another program that gets called and submitted from the origianl program that locks the DB in the first place. Bit, I'd need to do the update in the submitted called program. How do I unlock to get rid of the message below?
           Batch KJKJ01 of material 8232143636 is already locked by USERNAME
         Thank-You.

    I am locking the data because I am executing from a calling program. It is a material and batch that is locked and needs to be released. So what exactly is the name of the FM I am calling.
        DEQUEUE_OBJECTNAME ................What goes in objectname?
         Thank-You

Maybe you are looking for

  • How to move functions and procedures from packages into a schema?

    Hello, I have below requirements for a homework and my question is if someone can point me in the right direction to find documentation which can help me solve the below. Any information will be very much appreciated. Thank you. Write procedures and

  • Tunning the query for faster record retrieval

    Hi, I am back, now this time I donot really know in which forum I should post this query, in XML or in Oracle Developers ? Anyway... The problem is : I have a database with millions of record in that, I give a query based on some 4/5 parameters, and

  • Network Backup HD for Mac OS 10.3.9 and 9.2.2

    Hi, I'm going to be putting a 320 GB PATA Hitachi 320 GB HD into a Firewire enclosure for Backing up my 10.3.9 HD with Data Backup scheduling. I also have a G3 B&W with Mac OS 9.2.2 and Dantz retrospect express to use for Backup too. Is there a way t

  • MDI in CVI applications?

    Hi, I'm trying to make an application using MDI in CVI.  I've run across a few old threads from people attempting to do the same thing.  It seems that the general way of doing it is to: 1.  Load the 'child' panel as a top level panel. 2.  Use the Set

  • Difficulté A joindre itunes store

    quand je veux rejoindre itunes store avec mon ordi je recois le message suivant: echec du lien sécurisé vers itunes store. de plus quand je veux entrer dans le progamme itunes a partir de mon ordi je recois le message suivant: le composant que vous u