BAPI_GOODSMVT_CREATE for mov.type 101 for Delivery

Hi expert,ù
I have to use the BAPI_GOODSMVT_CREATE to create a 101 referring to a delivery but I can't find wich parameters I have to set.
If I refre to a purch.order it works correclyt, but the same settings are not applicable for delivery.
Any documentations or example?
Thanks

Hi,
Check if this is useful.
*-Step 1: Create Inbound delivery from outbound delivery
Input the delivery number, date & creator name
to impkf structure
*-- Do MIGO using Outbound delivery
  wa_imkpf-bldat = goodsrecdate.
  wa_imkpf-budat = goodsrecdate.
  wa_imkpf-xblnr = deliverynumber.
  wa_imkpf-usnam = sy-uname.
  CLEAR ws_i_cnt.
*-- Pass all the necessary details to I_MSEG - item details
  CLEAR wa_wueb. REFRESH i_mseg.
  LOOP AT i_wueb INTO wa_wueb.
    CLEAR wa_lips. CLEAR wa_mseg.
    READ TABLE i_lips INTO wa_lips WITH KEY vbeln = wa_wueb-vbeln
                                            posnr = wa_wueb-vbelp BINARY SEARCH.
    IF sy-subrc = 0 AND wa_lips-lgnum NE space. " only for WH managed
      ws_i_cnt = ws_i_cnt + 1.
      wa_mseg-line_id = ws_i_cnt.               " Line Number
      wa_mseg-global_counter = ws_i_cnt.        " Line Number
      wa_mseg-bwart = '101'.            " Movement Type
      wa_mseg-matnr = wa_wueb-matnr.            " Material Number
      wa_mseg-werks = wa_wueb-werks.            " Plant
      wa_mseg-lgort = wa_wueb-lgort.            " Storage Loc
      wa_mseg-charg = wa_wueb-charg.            " Batch
      wa_mseg-kzbew = c_b.                      " Movement Indicator ( B indicates
Goods movement for purchase order)
      wa_mseg-erfmg = wa_wueb-erfmg.            " Quantity
      wa_mseg-erfme = wa_wueb-erfme.            " UoM
      wa_mseg-bprme = wa_wueb-erfme.            " UoM
      wa_mseg-menge = wa_wueb-erfmg.            " Qty
      wa_mseg-meins = wa_wueb-erfme.            " UoM
      wa_mseg-ebeln = wa_wueb-ebeln.            " STO Number
      wa_mseg-ebelp = wa_wueb-ebelp.            " STO Item Number
      wa_mseg-migo_elikz = 1.                   " Delivery completion indicator( 1 - set automatically)
      wa_mseg-bstmg = wa_wueb-erfmg.            " QTY
      wa_mseg-lgnum = wa_lips-lgnum.            " WH No
      wa_mseg-vbeln = wa_wueb-vbeln.            " Delivery Number
      wa_mseg-posnr = wa_wueb-vbelp.            " Delivery Item number
      wa_mseg-lsmng = wa_wueb-erfmg.            " QTY
      wa_mseg-lsmeh = wa_wueb-erfme.            " UoM
      wa_mseg-bukrs = wa_wueb-ekorg.            " Purchase org
*-- Get Vendor Number from STO
      CLEAR wa_ekko.
      READ TABLE i_ekko INTO wa_ekko WITH KEY ebeln = wa_wueb-ebeln BINARY SEARCH.
      IF sy-subrc = 0.
        wa_mseg-lifnr = wa_ekko-lifnr.          " Vendor number
      ENDIF.
      wa_mseg-ean11_bme = wa_wueb-ean11.        " EAN11
      wa_mseg-insmk = space.                    " Stock Type ( space - Unrestricted use)
      wa_mseg-weanz = 1.                        " Number of GR/GI Slips to Be Printed
      wa_mseg-weanzx = c_x.                     " Updated information in related user data field
      wa_mseg-wempfx = c_x.                     " Updated information in related user data field
      wa_mseg-abladx = c_x.                     " Updated information in related user data field
      APPEND wa_mseg TO i_mseg.
    ENDIF.
  ENDLOOP.
*-- Do MIGO
  CALL FUNCTION 'MB_CREATE_GOODS_MOVEMENT'
    EXPORTING
      imkpf = wa_imkpf
      xallp = c_x
      xallb = c_x
      xallr = c_x
      ctcod = c_migo
      xlisu = c_x
    IMPORTING
      emkpf = i_emkpf
    TABLES
      emseg = i_emseg
      imseg = i_mseg.
  IF i_emkpf-subrc = 1.                  "Inbound delivery creation is success
    ws_c_indelvry = i_emkpf-msgv1.

Similar Messages

  • Inspection Lot generation for Movement type 101-O

    Hi
    I would like to know, which config / Master data need to generate Inspection Lot for Movement type 101-O.
    I enter subcontract vendor number and set 'SC Vendor' indicator in purchase order delivery address tab and I created QM data in Material Master.(Insp.Type 01)
    While doing GR with reference to purchase Order, stock is Posted to Material provided to vendor - Quality inspection stock. But Inspection Lot
    is not generated.
    Pl suggest me, What should i do to generate Inspection Lot.
    Thanks in Advance.
    RRS

    hi
    Soln 1) Just check whether Inspection is active for 101 - O in SPRO settings if not, activate the same.
    Path: Inspection Lot creation/Inspection for Goods Movement
    Soln 2) As you flag "SC Vendor" in PO and make GR all stocks will be shown against the Vendor.
    From your question I assume that you would like to do inspection for materials coming from Subcontactor end to your Plant:
    If this is the case you dont flag "SC Vendor" in PO, make a normal Goods Receipt for the Subcontracting PO, based on Insp setup in Material Master for 01 Insp type Insp lot will be created.
    Regards
    DC

  • Gr po upload for movement type 101

    Dear cons
    We want to upload GR PO UPLOAD FOR MOVEMENT TYPE 101(IMPORTED MATERIAL).We have store data in a excel file. We want to upload. What is the procedure to make a report? Because the procurement cycle of imported case is different to domestic case. For domestic case it is o.k. the problem is in imported case. Because in imported case first we enter invoice known as commercial invoice. Pl. look into the matter. How ABAP Consultant will do it.
    Thanks
    nrk

    Hi,
      In case of import PO's first we have to upload the customs or commercial invoicesfor the PO's.After this we need to prepare a file containg PO number, the uploaded commercial invoice number and the gr details columns.
    Then do the recording for GR's and give that recording to the ABAPer so that a BDC can be prepared for uploading.
    Thanks & Regards,
    Rambhupal

  • GR   PO UPLOAD FOR MOVEMENT TYPE 101 (IMPORTED)

    We want to use Goods receipt PO upload for movement type 101(imported.) I donot know the logic. Pl. give me some idea.For domestic case one T-code is presently running. The problem is in case of imported p.o. waiting for your early response.
    THANKS
    NRK

    hi,
    even for Imported PO ur using the same Tranasctioon code.
    but check ur proceedure.
    u need to book the MIRO for duty payment, attach the same to MIGO, while doing the GR, then Jid for posting the duties.
    again MIRO for invoice payment to vendor

  • Some key figure are not update for movement type 101

    Dear All,
    I have done load for Inventory and now i am finding that for some material the with movement type 101 the key figures are not getting populated, for these materials the values in characteristics is getting populated fine.
    I have loaded the data according to stranded procedure in "How to Load...."
    I have checked the values of material in R3 and it is there.
    Example of the record::
    Material    Plant Movement type  Calender Day    quanity Base Unit
    10101      01       350                     01.02.2006     20             KG
    10101        01       101                     05.07.2006                      KG
    10101         01      101                      10.07.2006                      KG
    The Quantity is not appearing in second and third record.

    Hi,
    Please check whether you have set  ''Rule groups''  at transfermation level . There you can set the conditions like materials having movement type X can be updated to one Key Figure and material having movement type Y can be updated to another Key figure.
    Please check whether you have set this option at transfermation level.
    For example, may be in your case materials from different plants are updating to different key figure.
    Thanks,
    Edited by: kavitha nagandla on Feb 17, 2010 7:19 AM

  • GR/GI Slip No Mandatory for Movement Type 101 and 102

    How to make 'GR/GI Slip No' mandatory in transaction 'MIGO' for only movement type 101 and 102.
    Regards,
    Piyush

    Which user exit?
    MB_CF001  Customer Function Exit in the Case of Updating a Mat. Doc.
    MBCF0002  Customer function exit: Segment text in material doc. item
    MBCF0005  Material document item for goods receipt/issue slip       
    MBCF0006  Customer function for WBS element                         
    MBCF0007  Customer function exit: Updating a reservation            
    MBCF0009  Filling the storage location field                        
    MBCF0010  Customer exit: Create reservation BAPI_RESERVATION_CREATE1
    MBCF0011  Read from RESB and RKPF for print list in  MB26           
    Please suggest.

  • Layout for movement type 101 (MB01)

    Hi experts,
    1) I would like to know more on how can I define the layout for MB01 other than using screen variant?
    2) Also, I would like to know more on how can I define layout for movement type lower than 201?
    I can only do that for movement type > 201 in SPRO.
    Thanks and regards,
    JT

    Hi Parag Mahajan,
    Just want to double confirm with you about this.
    What if I want to grey a field or make it available for user to make changes to a grey field?
    My problem is tcode MB01, the Document Date field was grey and defaulted to today's date. I want to make it available and allow user to change the document date.
    Thanks and regards,
    JT

  • GR quantity for movement type 101 not updated in PCA

    Hi,
    Does anyone have an idea why quantity is not updated in GLPCA-MSL for 101 movement type?. It has updated in FI (BSEG-MENGE) but not in PCA (GLPCA-MSL).
    Appreciate prompt response.
    Thanks,
    Rashmi

    Hi
       With note 834458 a statement for activity RMWE was introduced but removed again with note 962731 as this caused double quantities in PCA. Please read these 2 notes and check the coding in your system.
    regards
    Waman

  • Inspection lot not created for movement type 101 O

    Dear all,
    . We are creating a PO (ME21N) indicating in the view u201CDelivery addressu201D the same vendor than the PO and the flag u201CSubcontracting vendoru201D
    . The material has in MM02 the inspection type 0130 Receiving Insp. from External Processing.
    . There is QM plan with the Usage 53 GR external process.
    . When we do MIGO 101 u201CSpecial Stock Indicatoru201D O Parts prov. Vendor. The system doesnot create an inspection lot.
    But in MMBE the stock appears in u201CStock Provided to Vendoru201D u201Cquality stocku201D. The customer wants to control that stock in u201CQuality inspection:
    Can somebody help me?
    regards
    shilpa

    SPRO - QM - Quality inspection - Inspection lot creation - inspection of goods movement - Deactivate Quality Inspection for a Movement Type
    Check in this setting, whether QM is deactivated for 101 and special stock O

  • Movement type 101 for receiving plant for returning stock

    all,
    This may sound a silly question, but I just want to double check and double confirm.
    Our plant supplying stock to another plant (let's call plant B), however, sometimes the plant B will return back unacceptable stock back to us. What plant B do is that they wll create a return PO with flag on the return indicator. Next they will do a picking/packing, and perform a GR (i.e. movement type 161).
    Next, we will perform a 101 goods receipt into our system.
    At this point, my question are:
    1 - during GR - 101 of this bad quanlity stock, can I do a GR into BLOCKED STOCK TYPE by select the dropdown block stock in MIGO, will system accept.
    2 - instead of performing 101 GR, can I perform a 103 (i.e. GR into GR-blocked stock)?
    3 - our system OPPI setup is that the blocked stock is not taken into MRP calculation, thus, both of above method will prohibit them in MRP calculation. correct?
    thanks.

    Hi
    1 - during GR - 101 of this bad quality stock, can I do a GR into BLOCKED STOCK TYPE by select the drop down block stock in MIGO, will system accept.
    DO goes to Quality inspection stock or unrestricted stock  and from there it should be transfered to blocked stock but directly it will not go to blocked stock in receiving plant
    2 - instead of performing 101 GR, can I perform a 103 (i.e. GR into GR-blocked stock)?
    Not sure
    Regards
    Kailas ugale
    Edited by: kailasugale on Jun 2, 2011 3:23 PM

  • Issue in GI for shipment for movement type 161 for vendor returns

    Hi Guru's,
    When we try to make the Goods Issue for the shipment in VT12...I'm geting a error message as
    "Combination of Movement type/Special stock/  stock type is not possible".
    And also FYI..the delivery in the shipmet was completley picked and packed and loaded.
    Please Advice.

    Check following SAP Notes:
    - Note 1090988 - Pooling: Quality inspection for return delivery not possible
    Symptom - You run the ADEC special pooling process for a material in which master inspection setup is maintained.
    The error message M7 361 occurs: Combination of movement type/special stock/stock type is not possible. No inspection lot can be created by goods movement receipt (GR) for pooled stock.
    Reason and Prerequisites - It is not planned to deal with ADEC pooling order with quantity inspection lot. The relevant Customizing entries are missing for this process.
    Solution - Refer SAP Note 1090988
    - Note 376615 - M7001: MEU5 xx 01 is missing in table T156M
    Symptom - During goods receipt to a stock transport order with returns item, the system generates message M7001:
    'Please check table T156M: entry MEU5 xx 01 does not exist'. or message M7361: 'Combination of movement type/special stock/stock type not possible'. The system displays the error message if you want to post the returns item from the stock in quality inspection, from the restricted-use stock or from the blocked stock to the stock in transit.
    Cause  - The entry is missing in the standard system
    Solution - Refer SAP Note 376615
    Also, check Allowed Transaction & Reversal & Follow-on M Type node in Tcode OMJJ for M Type 161
    Thanks & Regards
    JP

  • Account assignment for Movement type 101

    Hi,
    Our SAP system prepopulates G/L account 500100 and non-changeable for PO's with A/c assingment category 'Y' - Third party sale. So, when we do a virtual Goods-receipt for this PO, it always posts to 500100.
    I would like to make this field changeable by the user. How can I do it ??
    Thanks
    Suri

    Hello Suresh,
    Go to OME9, select account assignement category Y, click on details (F2), Flag mark "Account assig. Changable".
    Hope this helps.
    Regards
    Arif Mansuri

  • BAPI_GOODSMVT_CREATE gm01 move type 101 reutrn none

    Hi,
         it's a very strang issue.i need goods receipt for a po.the code should be very simple,but it return none, no error and no success message.
    is anyone in the case,give me some tips,thank you very much.
    my code like:
    DATA: WA_EBAN   LIKE EBAN,
    WA_HEADER LIKE BAPI2017_GM_HEAD_01,
    WA_CODE   LIKE BAPI2017_GM_CODE,
    WA_RETURN LIKE BAPIRET2,
    GM_CODE   LIKE BAPI2017_GM_CODE OCCURS 0,
    GM_HEADER LIKE BAPI2017_GM_HEAD_01 OCCURS 0,
    GM_HEADRET LIKE BAPI2017_GM_HEAD_RET,
    GM_ITEM   LIKE BAPI2017_GM_ITEM_CREATE OCCURS 0,
    WA_ITEM   LIKE BAPI2017_GM_ITEM_CREATE,
    GM_RETURN LIKE BAPIRET2 OCCURS 0.
      SELECT SINGLE * INTO CORRESPONDING FIELDS OF WA_EBAN
    FROM EBAN WHERE BANFN = P_PURCHASE_NO AND BNFPO = P_PURCHASE_ITEM.
      IF SY-SUBRC = 0.
    WA_CODE-GM_CODE = '01'.
    APPEND WA_CODE TO GM_CODE.
    WA_HEADER-PSTNG_DATE = P_POSTG_DATE.  
    WA_HEADER-DOC_DATE = P_DOC_DATE.
    WA_HEADER-PR_UNAME = SY-UNAME.
    WA_HEADER-REF_DOC_NO = WA_EBAN-EBELN. 
    WA_HEADER-GR_GI_SLIP_NO = ' '.
    WA_HEADER-HEADER_TXT = 'PO reciept'.
    APPEND WA_HEADER TO GM_HEADER.
    WA_ITEM-PO_NUMBER = WA_EBAN-EBELN.
    WA_ITEM-PO_ITEM = WA_EBAN-EBELP.
    WA_ITEM-MVT_IND = 'B'.
    WA_ITEM-MOVE_TYPE = '101'.
    WA_ITEM-ENTRY_QNT = P_QUNATITY.
    WA_ITEM-ENTRY_UOM = WA_EBAN-MEINS.
    APPEND WA_ITEM TO GM_ITEM.
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
    EXPORTING
    GOODSMVT_HEADER  = WA_HEADER
    GOODSMVT_CODE
    = WA_CODE
    IMPORTING
    GOODSMVT_HEADRET = GM_HEADRET
    TABLES
    GOODSMVT_ITEM
    = GM_ITEM
    RETURN      
    = GM_RETURN.
    READ TABLE GM_RETURN INTO WA_RETURN WITH KEY TYPE = 'E'.
    IF SY-SUBRC = 0 OR GM_HEADRET-MAT_DOC IS INITIAL.
    CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
    LOOP AT GM_RETURN INTO WA_RETURN WHERE TYPE = 'E'.
    CONCATENATE LOG WA_RETURN-MESSAGE INTO LOG.
    ENDLOOP.
    ELSE.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT = 'X'.
    ENDIF.

    this issue is not solved,but i found the point is my account.other people can do this use bapi and migo,i only can use migo.

  • Goods receipt for return PO - MB01-Movement type 101-161

    Hi guys!
    I have one problem with output determination for goods movement (movement type 101 with internal movement type 161).
    I used SAP Note 426554 and for as I know the output determination customizing is ok:
    output type WE03, collective slip, access sequence 0003 , condition table: 72 Transaction/Printed Version/Print ID, Transaction/event type: WE, movement type: 101 - 161, Print indicator: 1Material document printout – 2 Return delivery, Transmission time-spot of the condition record (1 to 4):1-3, print indicator (RM07M-XNAPR) is set manually and maintained as NDR parameter in user master record, Output type print parameter is Plant/storage location (7), printer determination is customized.
    At header level, the document created with MB01 with reference to a return PO, doesn't have the XNAPR parameter (don't know why - it is set when using MB01). It may be this one the reason for not having any output message to print. For movement type 101 (in reference to a PO) all works fine. Just for 101-161 movement type the system doesn't create any output type.
    Do you have some suggestions? What should I do..what else soul I check?
    Thanks.
    Message was edited by:
            Florina Cheta

    Have a look at any of the following notes:-
    1)  Note 171989 - Sales-order-related productn: Custmr exit COPCP002
    2)  Note 520000 - FAQ: Valuated special stocks
    3)  Note 557582 - User exit and valuated sales order stock
    4)  Note 580228 - Incorrect prices for materials procured externally
    5)  Note 983193 - Docu:Externally procurd material in valtd sales order stock
    thanks
    G. Lakshmipathi

  • BAPI_GOODSMVT_CREATE is not working for movement type 701 in MIGO

    Hi gurus
    Can anybody help to track that bapi: BAPI_GOODSMVT_CREATE is not working for movement type 701 for MIGO Transaction.

    call this standard BAPI, AND EXECUTE IN SE37
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(GOODSMVT_HEADER) LIKE  BAPI2017_GM_HEAD_01 STRUCTURE
    *"        BAPI2017_GM_HEAD_01
    *"     VALUE(GOODSMVT_CODE) LIKE  BAPI2017_GM_CODE STRUCTURE
    *"        BAPI2017_GM_CODE
    *"     VALUE(TESTRUN) LIKE  BAPI2017_GM_GEN-TESTRUN DEFAULT SPACE
    *"     VALUE(GOODSMVT_REF_EWM) LIKE  /SPE/BAPI2017_GM_REF_EWM STRUCTURE
    *"        /SPE/BAPI2017_GM_REF_EWM OPTIONAL
    *"  EXPORTING
    *"     VALUE(GOODSMVT_HEADRET) LIKE  BAPI2017_GM_HEAD_RET STRUCTURE
    *"        BAPI2017_GM_HEAD_RET
    *"     VALUE(MATERIALDOCUMENT) TYPE  BAPI2017_GM_HEAD_RET-MAT_DOC
    *"     VALUE(MATDOCUMENTYEAR) TYPE  BAPI2017_GM_HEAD_RET-DOC_YEAR
    *"  TABLES
    *"      GOODSMVT_ITEM STRUCTURE  BAPI2017_GM_ITEM_CREATE
    *"      GOODSMVT_SERIALNUMBER STRUCTURE  BAPI2017_GM_SERIALNUMBER
    *"       OPTIONAL
    *"      RETURN STRUCTURE  BAPIRET2
    *"      GOODSMVT_SERV_PART_DATA STRUCTURE
    *"        /SPE/BAPI2017_SERVICEPART_DATA OPTIONAL
    *"      EXTENSIONIN STRUCTURE  BAPIPAREX OPTIONAL
    *"      GOODSMVT_ITEM_CWM STRUCTURE  /CWM/BAPI2017_GM_ITEM_CREATE
    *"       OPTIONAL
      call function 'BAPI_GOODSMVT_CREATE'
        exporting
          goodsmvt_header         = goodsmvt_header
          goodsmvt_code           = goodsmvt_code
          testrun                 = testrun
          goodsmvt_ref_ewm        = goodsmvt_ref_ewm
        importing
          goodsmvt_headret        = goodsmvt_headret
          materialdocument        = materialdocument
          matdocumentyear         = matdocumentyear
        tables
          goodsmvt_item           = goodsmvt_item
          goodsmvt_serialnumber   = goodsmvt_serialnumber
          return                  = return
          goodsmvt_serv_part_data = goodsmvt_serv_part_data
          extensionin             = extensionin.
    commit work.
    hi, rewards point, if this is useful,
    regrds
    karthikeyan

Maybe you are looking for

  • Upgrading SolMan to EHP1

    Hello Gurus, Need a help, I am in the process of upgrading the SolMan to EHP1. I have read all the Docs available in SMP and also refered the Blogs. Can any 1 please give the Brief steps that we need to follow to upgrade SolMan as i need to submit th

  • Error in BatchLoad process - Object variable or with block variable not set

    Hi All, We are working on FDM version 11.1.1.3 with Essbase as a target system. To automate the data load process, we are loading the batch loader feature. I have taken the backload script from admin guide and it is working fine in our test environme

  • Pricing for Domestic , imports and service

    We have following scenarios: Domestic purocurement. 1. Purchase of Consumables, Excise duty credit taken (Cenvetable) 2. Purchase of Spares, Excise duty credit taken (Cenvetable) 3. Purchase of Services, Service tax credit taken. 4. Purchase of Consu

  • Global timeline stretch possible??

    Is there a way to do a global timeline stretch in CS4 ? Basically I need to change the animation speed from 12 fps to 25 fps - but I dont wont the movie to play twice as fast, and I don't want to have to manually move each key frame to fix it because

  • Hi gurus in calltansaction

    hi gurus in calltansaction there r totally 10 records , while processing it, ifsystem craches after 5th record , is it possible to start again from 6th record. explin me plz.