FM for migo against outbound delivery

call function 'BAPI_GOODSMVT_CREATE'
  exporting
    goodsmvt_header             = gmhead
    goodsmvt_code               = gmcode
  TESTRUN                     = ' '
IMPORTING
    goodsmvt_headret            = mthead
  MATERIALDOCUMENT            =
  MATDOCUMENTYEAR             =
  tables
    goodsmvt_item               = itab
  GOODSMVT_SERIALNUMBER       =
    return                      = errmsg
I am using this FM for migo against outbound delivery can i get waht parameters i have to pass
for this FM for outbound delivery

gmhead-pstng_date = sy-datum.
gmhead-doc_date = sy-datum.
gmhead-pr_uname = sy-uname.
gmcode-gm_code = '01'.   "01 - MB01 - Goods Receipts for Purchase Order
itab-move_type  = '101'.
  itab-mvt_ind    = 'B'.
  itab-plant      = 'FD11'.
  itab-material   = '0000900152'.
  itab-entry_qnt  = '1.000'.
  itab-move_stloc = 'FG'.
  itab-stge_loc   = 'FG' .
  itab-po_number  = '5500004086'.
itab-DELIV_NUMB = '0171000465'.
itab-DELIV_ITEM    = '10'.
  itab-PO_ITEM    = '10'.
call function 'BAPI_GOODSMVT_CREATE'
  exporting
    goodsmvt_header             = gmhead
    goodsmvt_code               = gmcode
  TESTRUN                     = ' '
IMPORTING
    goodsmvt_headret            = mthead
  MATERIALDOCUMENT            =
  MATDOCUMENTYEAR             =
  tables
    goodsmvt_item               = itab
  GOODSMVT_SERIALNUMBER       =
    return                      = errmsg
Error in function
Material document data and PO data do not match (Material)
i am getting this error
help me

Similar Messages

  • Need to do MIGO against PO instead of MIGO against Outbound Delivery

    Hi Experts,
    Inorder to avoid Manual errors, I am trying to do MIGO against PO, instead of MIGO against Outbound Delivery. The requirement is to fetch the Batch and Delivery quantity based on outbound delivery for a PO and populate with other PO details in MIGO tcode.
    I have tried using BADI's MB_MIGO_ITEM_BADI, however in Method ITEM_MODIFY, there is only importing parameter IS_GOITEM having PO details, batch and quantity. I need batch and quantity in the changing parameters of table type (useful for batch split purpose).
    In MB_MIGO_BADI, tried with LINE_MODIFY method. PO, batch and quantity are present in changing parameter CS_GOITEM (it is not of table type).
    I have written the logic for fetching the outbound delivery details (batch and quantity) based on PO, I need to know the place where to place it in MIGO.
    Thanks in Advance,
    Regards,
    Murthy.

    u can use line modify
    here is a sample below;
    CS_GOITEM-EXBWR is changed with  tp_dmbtr.
    sample:
    if cs_goitem-bwart eq '939'. "
          PERFORM f_get_material_value IN PROGRAM Zcl_item_harici_up
           USING    cs_goitem-matnr
                    cs_goitem-werks
                    cs_goitem-bwtar
           CHANGING up_DMBTR
                    zmtart.
          tp_dmbtr = tp_dmbtr + cs_goitem-menge * up_DMBTR.
    CS_GOITEM-EXBWR = tp_dmbtr.
    endif.

  • MIGO for GRN against Outbound delivery

    Hi,
    I have a requirement for creation of GRN against outbound delivery using MICO tcode, i have used the FM 'BAPI_GOODSMVT_CREATE but in table T158G for MIGO tcode there is no number assigned in our system landscape as it is std table, but respectively (MB01,MB31,etc no's are there) how to create number for MIGO in table T158G and correspondingly Movement Indicator which should be used for Outbound delivery, please kindly sujjest me.
    Thanks in advance,
    Puneetraj.

    Hi
    No, I am not having any release procedure.
    Yes, I have picked the qty in VL02N
    In vendor master, I have assigned the supplying plant to vendor.
    Actually, i have created the plant as vendor and assigned it to itself.
    Its not a error message. plz see the message.
    Document 0080016192   does not contain any selectable items
    Message no. M7064
    Diagnosis
    The document or document item entered cannot be adopted.
    Possible reasons for this are:
    The document items have already been processed
    (Suggest zero lines indicator set?).
    the document items have been deleted or are blocked.
    the document items have been created for a different plant.
    (for reservations only) movements are not yet allowed for the reservation items.
    (for reservations only) the document items are retrograde components of the order. These are posted using the order confirmations.
    A confirmation must exist for the document items.
    The document items must be released first.
    The document is an R/2 document.
    Procedure
    Make sure your entries are correct.
    If the system has already processed the total quantity, you can set the Suggest zero lines indicator. The system will suggest the quantity zero for the items that have already been processed.
    If you have entered a particular item, cancel the item. If you do not enter an item, the system searches all of the open items in the document.
    If the document is a purchase order, production order or a reservation, you can enter search criteria in the dialog box.
    You access the dialog box by choosing Enter with reference on the initial screen.
    If the document is an SAP R/2 document, you have to cancel it manually by entering the reversal movement type.
    Regards
    Neeraj Kumar Jain

  • Error in MIGO against Outbound delivery in INTRA STO

    Hi,
    I'm doing intra company STO.
    I've done all the settings for STO for both the plants under different comp codes.
    Now against my scheduling ageement, material is issed from supplied plant.
    When I'm trying to do GR against outbound delivery, system is giving me the error as"Enter Chapter ID for the material"
    Please note that I've maintained chapter id for both plants for this material & also maintained excise details.
    Excise duties are coming properly.
    When I chk at item level, chapter ID was not displaying n also, the field is grey , so i'm nt able to change it manually.
    Please help me to ressolve this issue.
    Thanks & Regards,
    Piyush

    Hi Kiran,
    Yes it is reflecting in material master, too.
    But in MIGO, it's not.
    Initially it's giving me warning message as" Chapter ID is changed to******"
    And later the above said error.
    Regards,
    Piyush

  • MIGO against Outbound Delivery, fully GR-booked items appear again

    Hello gurus,
    I am totally confused with the MIGO behavior. Please help me out.
    We have a user Movement Type 9xx, which is made as a copy of MvT 101. We use this MvT 9xx to support our intra company Stock Transfer Order process.
    After STO is created, Outbound Delivery is made and Goods Issue is done we can do MIGO GR for the corresponding Outbound Delivery. (Well, I have to post GR again Outbound Delivery not STO because otherwise the outbound delivery document flow <in table VBFA> is not updated.)
    Say I have two items (X and Y) in one outbound delivery.
    If I post a GR 101 against outbound delivery item X and then I do MIGO GR against the same outbound delivery I only see item Y. This is perfectly correct.
    But the strange thing is that if I post a GR 9xx against the outbound delivery item X and I try again to post GR 9xx against the same outbound delivery (at this time I want to do GR for item Y) the both items (X and Y) are displayed on the MIGO screen.
    What can I do to let MIGO don't display the item X when a full qty GR 951 has taken place?
    Because of some constrains we need to realize MIGO GR against outbound delivery on item level. Is this doable?
    Any help will be appreciated. Thanks in advance.
    Yongmei

    Dear Yongmei,
    From your explanation, it appears that there is a difference in the attributes for the two Mvt types. I wld suggest you to compare the Quantity updation rules for both the Mvt types in OMJJ.
    Also check all the settings have been made for 9xx in OMJJ.
    Hope this helps.
    Regards
    Keshav

  • MIGO FOR GR against OUTBOUND DELIVERY

    Hi All
           In MIGO transaction I want to do some modification in that when I am going to save purchase order ie for Goods receipt for outbound delivery and movment type 101, I want to call another transaction created by myself.
    But for above when I am debugging the program in that I can see that   all methods only can u please tell me where to put call trancation which should be called at save button only
    Regards
    Sagar

    Use LINE_MODIFY from the MB_MIGO_BADI Business Add-ins SE18. create an implementation and use the LINE_MODIFY method to restrict the plants.  As for disabling why dont you try the loop at screen command and check what screens will be turned off from the other BADI methods. you can mostly find these screens in the PAI and PBO detail methods.

  • GR posting using inbound Idoc against Outbound delivery

    Hi,
    We are doing SAP ISR integration with third party POS and there we have a scanario where we have to post GR against outbound delivery using inbound Idoc. Can anybody help me out, how can we do it.
    In SAP processing would happen using MIGO against outbound delivery number and movement type 101. We tried the same with Idoc WMMBXY message type but not suceed.
    Looking for positive reply.
    Regards
    Vikrant pathak

    Hi,
    You can never do a GR against an outbound delivery, but where as you can do a GR against PO with reference to corresponding sales order with special stock indicator.
    That means when the GR is done the goods what ever you have received is going to be blocked against the corresponding sales order and when you do the outbound delivery against the sales order stock is already available and the goods issue will happen smoothly without any errors.
    We have implemented the same in my earlier project.
    Thanks,
    Mahesh.

  • Goods receipt against outbound delivery

    Hello,
    Can we create a goods receipt against an outbound delivery document?
    The transaction MIGO provides an option but for some reason I am not able to create.
    The scenario is the following  :
    Lets say there are two DCs DC1 and DC2  : both belong to different company codes.
    - Outbound delivery created by DC1,then post goods issue
    - Goods receipt to be done against the above outbound delivery.
    Is it possible?
    (I do not want to create a PO for this.)
    Regards,
    Lisa

    Hi Prabhu,
    I have been trying to post goods receipt against outbound delivery but here is the error I have been getting :
    "Goods receipt not possible for delivery 80000059: error code 4".
    Is there any specific reason for this?
    Here is the process I have follwed :
    -Created outbound deliveries via allocation
    -Picking
    -Post Goods Issue
    - Migo - Goods Receipt.
    Regards,
    Lisa

  • PIR no consuming when GR against outbound delivery

    Hello all,
    We are using strategy "11".  When a GR is completed against the inter-company Purchase Order, the PIRs are consumed with no problem.  However, when a GR is done for the same material against the Outbound Delivery, the PIRs are not consumed.  We use the MIGO transaction.
    We do this because we need to see the stock in-transit and want the document flow to update. Do you know of anyway to get the GR for Outbound Delivery to consume the PIRs?
    Any help is greatly appreciated.
    Thanks.

    Hi,
    ...I guess you are speaking about GI against outbound delivery in intercompany stock transport process...
    In this case I don't think you can do any settings to achieve your goal. The PIR in the receiving plant will reduce due to GR, i.e. when your stock level increases because of 101 mvt.
    Stock in transit doesn't increase your available stock. You physically haven't received it yet. Maybe stock in transit is much stronge (much certain)r than a POitem but it's not so strong as a GR...(when you physically have the stock)
    That's all. (just my opinion)
    http://help.sap.com/saphelp_47x200/helpdata/en/a2/4e799d927d11d1800f00c04fadcb73/frameset.htm
    Csaba

  • STO Problem while doing GR against outbound delivery

    Hi Gurus,
    Need your help regarding STO,in my case i created
    1. STO
    2. Delivery in VL10B t code and did PGI
    3. on the basis of Delivery i created billing document
    4. Excise invoice in J1IIn
    Now while doing GR against outbound delivery system in not doing GR giving some error code 1 as follows
    Goods receipt not possible for delivery 4900000212: error code 1
    Message no. M7865
    Diagnosis
    The goods receipt for the delivery cannot be posted.
    The error according to the error code:
    1. The delivery does not exist.
    2. The delivery type is unknown.
    3. The delivery is not goods issue posted.
    4. There are no delivery items.
    5. The receiving plant could not be determined.
    6. The delivery items have already been goods receipt posted or contain zero quantities.
    7. Goods receipt(effect)movement type to goods issue movement type could not be determined.
    8. It is not currently possible to block the delivery.
    Procedure
    Error code 1      : Check your entry.
    Error code 2,3,4,6: Check the delivery and its document flow.
    Error code 5      : The delivery must be related to a purchase order or
                        the customer must be a retail business.
    Error code 7      : Check the settins for your movement types.
    My delivery types shipping points everthing is in place but am not able to trace out whats the problem. Please help its urgent
    Regards
    Vivek

    Hi
    Based on the error code 1 , it says that the delivery does not exists in the system, That means you cannot perform a Goods receipt againsst the document specified
    I have also not done Goods receipt with reference to Outbound delivery. So i am not able to confirm that this can be done or not.... i will definitely get back to you on this.
    Thanks & Regards
    Kishore

  • Goods Issue against outbound delivery from blocked stock

    Dear All
    I want to do goods issue against outbound delivery created without any reference from blocked stock of my storage location. Is there any way I can achieve this? I know normally SAP allows goods issue from unrestricted stock but my business scenario requires goods issue to be done from blocked stock against outbound delivery.
    Please let me know any solution for this.
    Thanks and Regards
    Satish Kumar

    Hi
    Check this link where similar issue has discussed and its resolved as well. Please try this and update the findings. If possible could you share the background of this strange requirement.
    http://scn.sap.com/thread/1541911
    Thank$

  • BAPI - GR Against Outbound delivery in STO Process

    Hi,
    For RF transactions i need to do GR Against Outbound delivery in STO Process, For that I need BAPI . 
    Is the BAPI is 'BAPI_GOODSMVT_CREATE'. or something different.
    Regards,
    Jothiswaran.

    You can use this one.

  • Goods Issue for a Return Outbound Delivery for both Sales Returns

    Hi gurus..
    tell me the approch for the following development....
    custom transaction to perform a Goods Issue for a Return Outbound Delivery for both Sales Returns and Consignment Returns (Pickups) process within a lean warehouse in SAP.
    it is vry urgnt
    thnks

    I seem to have found the information I required here:
    http://wiki.sdn.sap.com/wiki/display/Snippets/Simulating+the+Sales+Cycle+with+BAPI's
    I'm going to keep this post active because I'd still like answers to my questions and any advice that you might be willing to share in regards to what I am trying to do.
    Edited by: Mikael Nensén on May 18, 2011 3:52 PM

  • Bapi for vl01no create outbound delivery without order reference

    Hi Guru's, i need help, I'm looking for BAPI VL01NO
    Any suggestions?
    Thanks for everything
    Edited by: GaBo_s Gabo on Sep 22, 2009 8:48 PM

    Hi,
    Following is the sample code for creation of outbound delivery Using BAPI 'BAPI_DELIVERYPROCESSING_EXEC'
    Which may be helpful.
    PARAMETERS: p_vbeln LIKE vbak-vbeln.
    DATA: BEGIN OF t_vbap OCCURS 0,
    vbeln LIKE vbap-vbeln,
    posnr LIKE vbap-posnr,
    kwmeng LIKE vbap-kwmeng,
    matnr LIKE vbap-matnr,
    werks LIKE vbap-werks,
    END OF t_vbap.
    DATA: t_request TYPE STANDARD TABLE OF bapideliciousrequest
    WITH HEADER LINE.
    DATA: t_created TYPE STANDARD TABLE OF bapideliciouscreateditems
    WITH HEADER LINE.
    DATA: t_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    SELECT vbeln posnr kwmeng matnr werks
    INTO TABLE t_vbap
    FROM vbap
    WHERE vbeln = p_vbeln.
    LOOP AT t_vbap.
    t_request-document_numb = t_vbap-vbeln.
    t_request-document_item = t_vbap-posnr.
    t_request-quantity_sales_uom = t_vbap-kwmeng.
    t_request-id = 1.
    t_request-document_type = 'A'.
    t_request-delivery_date = sy-datum.
    t_request-material = t_vbap-matnr.
    t_request-plant = t_vbap-werks.
    t_request-date = sy-datum.
    t_request-goods_issue_date = sy-datum.
    t_request-goods_issue_time = sy-uzeit.
    APPEND t_request.
    ENDLOOP.
    CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
    TABLES
    request = t_request
    createditems = t_created
    return = t_return
    READ TABLE t_return WITH KEY type = 'E'.
    IF sy-subrc = 0.
    MESSAGE e208(00) WITH 'Delivery creation error'.
    ENDIF.
    COMMIT WORK.
    READ TABLE t_created INDEX 1.
    WRITE: / 'Delivery ', t_created-document_numb, ' created'.
    Let me know if any issues.
    Thanks & Regards,
    Naveen

  • BAPI for creation Partial Outbound delivery

    Hi Guru
    Please suggest me any BAPI's for creating Partial Outbound Delivery
    I am working on BAPI_OUTB_DELIVERY_CREATE_SLS           but its creating full delivery
    Pls suggest me anythg..
    Best Regards
    Subham Arya

    Hi
    For finding the right BAPI, have a look at the following blog:
    /people/g.koopmann/blog/2010/03/07/using-bapis
    Best regards,
    Guido Koopmann

Maybe you are looking for