Bapi for Goods Receipt - Outbound Delivery

Hello all,
I am looking for a Bapi for <b>Goods Receipt for Outbound Delivery</b>.
I have searched the forum but found BAPIs only for GR for Inbound Delivery, GR for purchase order etc. But not for GR for Outbound Delivery.
Can someone guide?
Thanks and Regards,
Reena

Hi Reena,
use this code....
*& Report  ZSAN_BAPI_GOODSMVT_CREATE                                   *
REPORT  ZSAN_BAPI_GOODSMVT_CREATE .
DATA: GOODSMVT_HEADER LIKE BAPI2017_GM_HEAD_01,
      " Material Document Header Data
      GOODSMVT_CODE LIKE BAPI2017_GM_CODE,
      " Assign code to transaction for BAPI goods movement
      MATERIALDOCUMENT LIKE BAPI2017_GM_HEAD_RET-MAT_DOC,
      " Number of Material Document
      GOODSMVT_ITEM LIKE BAPI2017_GM_ITEM_CREATE OCCURS 0 WITH HEADER LINE,
      " Create Material Document Item
      RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE
      " Return table for messages
*Fill values in header
GOODSMVT_HEADER-PSTNG_DATE = '20030825'.
GOODSMVT_HEADER-DOC_DATE = '20030802'.
*Fill GOODSMVT_CODE
GOODSMVT_CODE-GM_CODE = '05' .
*Fill Item Table
GOODSMVT_ITEM-MATERIAL = '100-100'.
GOODSMVT_ITEM-PLANT = '1000'.
GOODSMVT_ITEM-STGE_LOC = '0001'.
GOODSMVT_ITEM-MOVE_TYPE = '501'.
GOODSMVT_ITEM-ENTRY_QNT = '50'.
GOODSMVT_ITEM-ITEM_TEXT = 'Test Sanket'.
*GOODSMVT_ITEM-COSTCENTER = '1000'.
APPEND GOODSMVT_ITEM.
*Create Good's movement
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
  EXPORTING
    GOODSMVT_HEADER  = GOODSMVT_HEADER
    GOODSMVT_CODE    = GOODSMVT_CODE
  IMPORTING
    MATERIALDOCUMENT = MATERIALDOCUMENT
  TABLES
    GOODSMVT_ITEM    = GOODSMVT_ITEM
    RETURN           = RETURN.
*Commit BAPI
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
  EXPORTING
    WAIT = 'X'.
*Display Goods movement number
FORMAT COLOR 6 INVERSE ON.
READ TABLE RETURN WITH KEY TYPE = 'E'.
IF SY-SUBRC = 0.
  WRITE: /,'ERROR! Goods movement not created'.
ELSE.
  WRITE: /,'Goods movent number',MATERIALDOCUMENT COLOR 5,
           'posted for material',GOODSMVT_ITEM-MATERIAL.
ENDIF.
FORMAT COLOR OFF INVERSE OFF.
If useful reward me with points.
Thanks
Sanket.

Similar Messages

  • Unable to post Goods Receipt - Outbound Delivery

    In MIgo when i am selecting Goods Receipt -> Outbound Delivery & enter, the screen replace to Goods Receipt -> Purchase Order. I want to know is there any customizing is re queried.

    Yes.
    You can check it in below config path
    spro>MM>inventory management->settings for enjoy transaction->settings for goods movements (MIGO)-->settings for transaction and refewrence documents
    Regards
    Antony

  • 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

  • BAPI for Goods Receipt

    HI All,
              Am new to this MM module. I created purchase order and goods receipt for that purchase order now i want 3 BAPIs.
                1. Get list of Goods Receipt (Am using BAPI_GOODSMVT_GETITEMS is it correct or not)
                2. Confirm Goods Receipt
                3. Maintain Stock at a particular Storage Location
            Anybody can tel me pls Confirm Goods Receipt means what?
    Thanks,
    Arun

    Dear Arun,
    Please find detail information from this URL explaining good receipts.
    http://help.sap.com/saphelp_47x200/helpdata/en/4d/2ba31643ad11d189410000e829fbbd/frameset.htm
    => Good Receipts
    Best Regards,
    ian, Wong Loke Foong

  • BAPI for goods receipt for subcontracting PO

    Dears,
    I Just want to confirm that whether BAPI "BAPI_GOODSMVT_CREATE " will do the goods receipt for the subcontracting PO. SInce  I will be passing only 101 mvy type in BAPi, will the system automatically call 543 mvt type and post the consumption.
    Require suggestions
    Regards
    Kamesh

    Hi,
    Yes, BAPI_GOODSMVT_CREATE will work for subcontracting GR as well.
    It all depends on the parameters you pass to the BAPI.
    Example give below:
    *Item Parameters to be passed:     
    Ordered (Subcontracting) Material:
    Parameter     Field     Description     Value
    GOODSMVT_ITEM     MATERIAL     Material Number     100-200
         PLANT     Plant     1000
         ENTRY_QNT     Quantity in Unit of Entry     0.000
         MOVE_TYPE     Movement Type     121
         PO_NUMBER     Purchase Order Number     4500000007
         PO_ITEM     Item Number of Purchasing Document     00010
         MVT_IND     Movement Indicator     O
         LINE_ID     Unique identification of document line     000001
         PARENT_ID     Identifier of immediately superior line     000000
    Note: Quantity of ordered material must be zero.
    Component Material 1:
    Parameter     Field     Description     Value
    GOODSMVT_ITEM     MATERIAL     Material Number     100-100
         PLANT     Plant     1000
         ENTRY_QNT     Quantity in Unit of Entry     2.000
         LINE_ID     Unique identification of document line     000002
         PARENT_ID     Identifier of immediately superior line     000001
    Note: LINE_ID should be incremented for each component and the PARENT_ID remains same for all the components of an ordered material. Component negative quantity can be given in case of Under Consumption.
    Component Material 2:
    Parameter     Field     Description     Value
    GOODSMVT_ITEM     MATERIAL     Material Number     100-100
         PLANT     Plant     1000
         ENTRY_QNT     Quantity in Unit of Entry     3.000
         LINE_ID     Unique identification of document line     000003
         PARENT_ID     Identifier of immediately superior line     000001

  • BAPI for Goods receipt Movement type 921

    Hi Gurus,
    can you please tell which BAPi will support Goods receipt Movement type 921(MIGO) and Goods Issue movement type 201.
    Thanks
    Rajeev

    Hi,
    This BAPI can be used for both good receipt and good issue purposes.
    Please give it try ...
    Regards,
    Ferry Lianto

  • Is there any BAPI for Goods receipt that uses LIKP and LIPS tables?

    Hi experts
             I want to pull info for a given delivery note(DN) by joining LIKP and LIPS tables. Is there any existing BAPI that can give my info by using the two tables?
    Please help
    Thanks
    Gopal

    Check the above link and reward points if helpful
    http://help.sap.com/saphelp_nw04/helpdata/en/b0/dad2b40b3611d2a55a0060087832f8/content.htm

  • BAPI needed  for  Goods Receipt Purchase Order(Transaction : MIGO)

    Hi all,
    We have a requirement where in we need to post the documents throuh BAPI for Goods receipt Purchase order(Transaction: MIGO).
    Any inputs on this..is highly appreciable...
    thanks in advance...
    regards..
    prathima.

    Hi,
    use 'BAPI_GOODSMVT_CREATE'
    Check this sample.
    code
    REPORT ZRICH_0001 .
    Structures for BAPI
    DATA: GM_HEADER TYPE BAPI2017_GM_HEAD_01.
    DATA: GM_CODE TYPE BAPI2017_GM_CODE.
    DATA: GM_HEADRET TYPE BAPI2017_GM_HEAD_RET.
    DATA: GM_ITEM TYPE TABLE OF
    BAPI2017_GM_ITEM_CREATE WITH HEADER LINE.
    DATA: GM_RETURN TYPE BAPIRET2 OCCURS 0 WITH HEADER LINE.
    DATA: GM_RETMTD TYPE BAPI2017_GM_HEAD_RET-MAT_DOC.
    CLEAR: GM_RETURN, GM_RETMTD. REFRESH GM_RETURN.
    Setup BAPI header data.
    GM_HEADER-PSTNG_DATE = SY-DATUM.
    GM_HEADER-DOC_DATE = SY-DATUM.
    GM_CODE-GM_CODE = '04'. " MB1A
    Write 971 movement to table
    CLEAR GM_ITEM.
    MOVE '412' TO GM_ITEM-MOVE_TYPE .
    MOVE 'Q' TO GM_ITEM-SPEC_STOCK.
    MOVE '3800533484' TO GM_ITEM-MATERIAL.
    MOVE '1' TO GM_ITEM-ENTRY_QNT.
    *MOVE 'PC' TO GM_ITEM-ENTRY_UOM.
    MOVE '1060' TO GM_ITEM-PLANT.
    MOVE '0007' TO GM_ITEM-STGE_LOC.
    *MOVE '0901' TO GM_ITEM-MOVE_REAS.
    MOVE 'P203601001' TO GM_ITEM-WBS_ELEM.
    MOVE 'P203601001' TO GM_ITEM-VAL_WBS_ELEM.
    APPEND GM_ITEM.
    Call goods movement BAPI
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
    EXPORTING
    GOODSMVT_HEADER = GM_HEADER
    GOODSMVT_CODE = GM_CODE
    IMPORTING
    GOODSMVT_HEADRET = GM_HEADRET
    MATERIALDOCUMENT = GM_RETMTD
    TABLES
    GOODSMVT_ITEM = GM_ITEM
    RETURN = GM_RETURN.
    IF NOT GM_RETMTD IS INITIAL.
    COMMIT WORK AND WAIT.
    CALL FUNCTION 'DEQUEUE_ALL'.
    ELSE.
    COMMIT WORK AND WAIT.
    CALL FUNCTION 'DEQUEUE_ALL'.
    ENDIF.
    WRITE:/ GM_RETMTD.
    LOOP AT GM_RETURN.
    WRITE:/ GM_RETURN.
    ENDLOOP.
    [/code]
    Also check the Bapis
    BAPI_PO_CREATE --> To create Purchase Order
    BAPI_PO_CHANGE --> To change Purchase Order
    BAPI_PO_GETDETAIL --> Todisplay Purchase Order
    Regards,
    Raj.

  • 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

  • Determination of a door for goods receipt via MIGO without inboud delivery

    All,
    Has anyone set up configuration to determine a warehouse management door for goods receipt when there is no inbound delivery?  I wish to utilize door to assist in queue determination and I am unable to find the right settings for door determination on goods receipt.
    Thank you,
    Sandy

    For making the Inbound delivery as required for processing a goods recipt, you need to use the confirmation control key in the PO.
    The ASN from the Vendor vvia EDI will post as an Inbound delivery in the PO.
    In the configuartion of the confirmation control key maintain the Confirmation sequence with Inbound Delivery and mark it as GR relevant and GR assignment.
    SPRO - IMG - MM- Purchasing - Confimrations - Set up confimrmation control.
    This setting will ensure that GR does not happen without an IBD

  • Regarding Outbound IDOC for Goods Receipt with MBGMCR03

    Hi Experts,
    Please let me know ,how to handle TYPE QUANT fields when i am generating an Outbound IDOC for Goods receipt for message type MBGMCR with the IDOC type MBGMCR03.
    At item level when passing the value for quantity received field ,the QUAN value into NUMC or CHAR before MASTER_IDOC_DISTRIBUTE to pass it to data record it is showing correctly in my BADI .
    after generating the idoc , the field value is appended with next field value passed.
    before generating IDOC
    erfmg( 60.000) - ENTRY_QTY(060)
    efrme (EA)       - ENTRY-UOM(EA)
    after generating IDOC
    IN WE02
    ENTRY_QTY-060EA
    later field values are mismatching .
    Please let me know the resolution.
    Thanks & regards
    Vishnu

    Hi,
         Standard Idoc types for invoice is  INVOIC01 and INVOIC02.
    - Use WE30 for seeing Idoc types with segment.
    Or otherwise go for Custom Idoc
               Create Custom Idoc type with required fields,custom output type and assign it to partner profiles.(If there is no std idoc type or output type)
              Use Funtion module MASTER_IDOC_DISTRIBUTE to generate Idocs while saving MIRO, for this you need to find exit or implement implicit enhancement while saving MIRO.
    http://wiki.sdn.sap.com/wiki/display/ABAP/StepstocreatecustomIDOC - Creating Custom idocs

  • 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.

  • 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

  • Error "Post the HUs for goods receipt so that they can be transfer "

    Hi Gurus,
    I am facing a problem while doing PGR the inbound delivery,
    I am moving stock from one SLOC (AY02- HU Managed) to Another SLOC
    (AA99-
    Non HU). Inbound delivery is created .
    I did automatic packing and packed the HU generated and saved the
    inbound delivery. While doing PGR I am getting error "Post the HUs for
    goods receipt so that they can be transfer posted Message no.
    HUFUNCTIONS254". Kindly Assist
    Steps for Reconstruction    
    1) MB1B post with 311 movement type.
    2) delivery gets created.
    3) pack the HU's automatically and HU's were generated, save the inbound.
    4) Do PGR .
    Regards
    Gopi

    Hello,
    There is a "concept problem". You are not doing a reception, you are posting an issue. After running MB1B system should create an Outbound delivery.
    In a HU-managed storage location you should use existing HU in order to pack the delivery. Instead of generate new HUs in the OD, try to pack existing ones.
    Regards

Maybe you are looking for

  • "Itunes missing files - please re-install"

    Hi I wonder if anyone can help me. I am having major problems ever since i downloaded the newest update. Cant access my itunes now as keep getting a message that says there are files missing and that I need to reinstall itunes. Have tried over and ov

  • Error when loading LCDS application

    Hi, I'm implementing an application using LCDS 3.1 data management service together with Fiber. I got the following error occasionally during the loading of my application in browse window. Error: DataService error. Configuration not present.        

  • CDs loaded, Artist name does not appear in ARTISTS list

    Among all the CDs I've loaded and songs purchased, I have 2 Carly Simon CDs on my video iPod. However, Carly Simon's name does not appear in my list of ARTISTS in the Music Menu. I did a sync with my iTunes list and the songs are indeed loaded. Why i

  • New APEX SIG in Montreal and Quebec City

    FYI Just a small post to let you know that there is a new APEX Special Interest Group forming in Montreal and Quebec city in collaboration with ORA*GEC (Oracle User Group East of Canada ). If you are interested , check the details and register here (

  • SCSM 2012 - password reset facility through the portal

    HI, I have what would seem some very basic questions about resetting passwords through the portal, but I hope someone can help. 1. My company want users to be able to reset their own passwords, so they see on their from loging screen an option to res