Error in" BAPI_GOODSMVT_CREATE"

Hi All,
Thanks For the reply,
My main problem is when i post goods  GR for the <b>subcontracting PO</b>  then only the error occurs
<b>"Of the required quantity of material TM1252-2020, 1.000 EA remain(s) open"</b>
When i post the GR for Standard PO and Schedule line Agreement it gets posted.
Am i missing any parameter which should be passed or some problem with the configuration itself.
Please help me. It's to be solved quickly.
Thanks in Advance.
Simha.
Message was edited by: Narasimha Rao Bandla
Message was edited by: Narasimha Rao Bandla

Hi. I have checked this BAPI also, but there is no handling for excise.
I know one function module: J_1IEXGM_UPDATE_EXCISE
to update the excise in MIGO.
But how i have to handle this after the BAPI .
I'm unable to perform it.
My text file contains all the data including excise information also.
How can i handle this??
Please help me..
Regards,
Simha.

Similar Messages

  • Error in Bapi_GoodsMvt_Create using Purchase order

    Hi Friends,
    I am using Bapi_goodsmvt_create for Goods Receipts against Purchase order.
    The below code i have given for Goods receipts
    It shows the error like
    ID : 8J
    Err No.:182
    Message : Entry 4500000344 00040 0000 not valid; correct entry
    Please help me to correct this error.
    Thanks
    Shankar
    ===================================
    Heading Structure
    st_gm_code-gm_code          = '01'.
    st_gm_header-pstng_date = '20070930'.
    st_gm_header-doc_date = '20070930'.
    st_gm_header-gr_gi_slip_no = '970015'.
    st_gm_header-bill_of_lading = '527213'.
    st_gm_header-header_txt = 'AIR'.
    st_gm_header-ref_doc_no = '4500000344'.
    Tables - ITEM CREATE.
    itab_afs_gm_itemx-plant = '2000'.
    itab_afs_gm_itemx-deliv_numb = '80100121'.
    itab_afs_gm_itemx-stge_loc = '2110'.
    itab_afs_gm_itemx-move_stloc = '2110'.
    itab_afs_gm_itemx-po_number = '4500000344'.
    itab_afs_gm_itemx-po_item = '00040'.
    itab_afs_gm_itemx-vendor = '0000650003'.
    itab_afs_gm_itemx-vendrbatch = 'ABC123'.
    itab_afs_gm_itemx-move_type = '101'.
    itab_afs_gm_itemx-mvt_ind = 'B'.
    itab_afs_gm_itemx-material = '000000000030000227'.
    itab_afs_gm_itemx-entry_qnt = 10.
    APPEND itab_afs_gm_itemx .
    ****&& Grid values
    gr_afs-matdoc_itm     = '0001'.
    gr_afs-grid_value = '205'.
    gr_afs-withdrawn_sku = 'X'. "Final issue at sku level
    gr_afs-stock_cat = '0000000001000366'.
    APPEND gr_afs.
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
      EXPORTING
        goodsmvt_header           = st_gm_header
        goodsmvt_code             = st_gm_code
      TESTRUN                     = ' '
    IMPORTING
       goodsmvt_headret           = st_gm_headret
       materialdocument            = mat_doc
       matdocumentyear             =  doc_year
      TABLES
        goodsmvt_item             = itab_afs_gm_itemx
       afs_goodsmvt_sku           = gr_afs
        return                    = bapi_return.
    IF sy-subrc = 0.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
    ENDIF.
    CLEAR itab_afs_gm_itemx.
    REFRESH itab_afs_gm_itemx.
    CLEAR gr_afs.
    REFRESH gr_afs.

    Hi,
    Here is some sample code from one of my programs, which does a 551 movement type. This should get you started. Just check the RETURN table for messages, they should tell you what you are missing.
    code
    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.
    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 = '06'. " MB11
    Write 551 movement to table
    clear gm_item.
    move '551' to gm_item-move_type .
    move '000000000040001234' to gm_item-material.
    move '1' to gm_item-entry_qnt.
    move 'EA' to gm_item-entry_uom.
    move '0004' to gm_item-plant.
    move '4000' to gm_item-stge_loc.
    move '201' to gm_item-move_reas.
    Determine cost center per plant
    case xresb-werks.
    when '0004'.
    move '0000041430' to gm_item-costcenter.
    when '0006'.
    move '0000041630' to gm_item-costcenter.
    when '0007'.
    move '0000041731' to gm_item-costcenter.
    when '0008'.
    move '0000041830' to gm_item-costcenter.
    endcase.
    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.
    call function 'BAPI_TRANSACTION_COMMIT'
    exporting
    wait = 'X'.
    [/code]
    Welcome to SDN! Please remember to award points for helpful answers and mark you post as solved when solved completely. Thanks.
    REgards,
    Raj.

  • Error during BAPI_GOODSMVT_CREATE(during GR)

    Hi all,
    i am using BAPI_GOODSMVT_CREATE to do GR.In the selection screen of my program, i am inputting
    1)PO number
    2)material--MCU-FUS(I ENTERED)
    3)vendor
    4)delivery order
    5)GR quantity--6000( i entered)
    After execution of my program , i am getting the error like
    <b>Posting error :PO ordered quantity is exceeded by 6000,EA:MCU-FUS.</b>
    But for that PO there is 1 lakh quqntity is there.i have done 14 postings before.so i have already received 42,000 quantity for that PO.
       now i want a GR for 6000 quantity,movement-101 & open stock.but i am getting this type of error.plz suggest, where is the mistake.
       Error is comming relating to quantity, but sufficient quantity of material is still there for that PO.plz suggest.it is very very urgent.
    any idea will be highly appreaciated.
    Regards
    pabitra

    i do not know what your scenario is. its quite difficult to say from here, as you would be working on different customization. all i can suggest you is in FM BAPI_GOODSMVT_CREATE there is one routine  "SET_MSG_TO_BAPIRET2". so you can set the brak point over here. you can see due to what your error is trigerring.
    shane

  • Error during BAPI_GOODSMVT_CREATE

    Hi Friends,
    I am using BAPI_GOODSMVT_CREATE for the doing GR for the Subcontracting Purchase order and getting the following Error messages.
    1   Of the required quantity of material 0006140000001A,1.400 M remain(s) open.
    Message Id  LB
    Message No 031
    2    Combination of movement type 543  and function selected not possible.
    Message Id  M7
    Message No 019
    Please suggest the solution.
    Krishan

    hi,
    *& Report  ZRPT_SUB_KO01GOODSMOVEMENT
    REPORT  ZRPT_SUB_KO01GOODSMOVEMENT.
    PARAMETERS : P_BAG(17)  TYPE C,
                 P_ZZORG LIKE zaUFK-ZZORG,
                 P_MATNR LIKE MARA-MATNR,
                 P_WERKS LIKE AUFK-WERKS,
                 P_WERK LIKE AFPO-PWERK,
                 P_DATE LIKE MKPF-BUDAT,
                 P_LGORT LIKE GOITEM-LGOBE.
    DATA : BDC_DATA TYPE STANDARD TABLE OF BDCDATA. "internla table for bdc data
      DATA : WA_BDC_DATA TYPE BDCDATA .                "work area for bdc data
      DATA : T_XMSEG TYPE   MSEG.
      DATA : T_XMKPF TYPE MKPF.
      DATA : V_BAGS1(17) TYPE C.
    DATA : BEGIN OF WA_MB1B,
           ZZGCODE TYPE ZMIGO-ZZGCODE,
           ZZGBAGS TYPE ZMIGO-ZZGBAGS,
           WERKS TYPE AUFK-WERKS,
           LGORT TYPE VBRP-LGORT,
           ZZORG TYPE zAUFK-ZZORG,
           END OF WA_MB1B.
    DATA : V_MATERIAL TYPE BAPI2017_GM_HEAD_RET-MAT_DOC.
    data : v_date(10) type c.
    DATA : T_GOODSMVT_HEADER TYPE BAPI2017_GM_HEAD_01,
           T_GOODSMVT_CODE TYPE BAPI2017_GM_CODE,
           T_GOODSMVT_ITEM TYPE STANDARD TABLE OF BAPI2017_GM_ITEM_CREATE,
           T_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.
    DATA : WA_GOODSMVT_ITEM TYPE BAPI2017_GM_ITEM_CREATE.
    DATA : BEGIN OF S_MARA,
           MEINS LIKE MARA-MEINS,
           END OF S_MARA.
    DATA : MATERIALDOCUMENT TYPE BAPI2017_GM_HEAD_RET-MAT_DOC.
    *FORM GOODSMOVEMENT TABLES T_RETURN
                             USING WA_MB1B LIKE WA_MB1B.
    SELECT SINGLE  MEINS
                   FROM MARA
                   INTO S_MARA
                   WHERE MATNR = P_MATNR.
       CONCATENATE p_date6(2) p_date4(2) p_date+0(4) INTO V_DATE SEPARATED BY '.'.
        T_GOODSMVT_HEADER-PSTNG_DATE = P_DATE.
        T_GOODSMVT_HEADER-DOC_DATE = P_DATE.
        T_GOODSMVT_CODE-GM_CODE = '04'.
        WA_GOODSMVT_ITEM-MATERIAL =      P_MATNR.                    "'000000000000001556'.
        WA_GOODSMVT_ITEM-PLANT  =        P_WERK.                     " '1000'.
        WA_GOODSMVT_ITEM-STGE_LOC =      P_LGORT.                    " '0001'.
        WA_GOODSMVT_ITEM-MOVE_TYPE =     'Z42'.
        WA_GOODSMVT_ITEM-VENDOR =         P_ZZORG.                   "'0000100224'.
        WA_GOODSMVT_ITEM-ENTRY_QNT =      P_BAG.                   " '1'.
        WA_GOODSMVT_ITEM-ENTRY_UOM =     S_MARA-MEINS.
        WA_GOODSMVT_ITEM-ENTRY_UOM_ISO = S_MARA-MEINS.
        WA_GOODSMVT_ITEM-MOVE_PLANT = P_WERKS.
        APPEND WA_GOODSMVT_ITEM TO T_GOODSMVT_ITEM.
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
    EXPORTING
          GOODSMVT_HEADER          = T_GOODSMVT_HEADER
          GOODSMVT_CODE            = T_GOODSMVT_CODE
    IMPORTING
        MATERIALDOCUMENT           = V_MATERIAL
    TABLES
          GOODSMVT_ITEM            = T_GOODSMVT_ITEM
    RETURN                        = T_RETURN.
    BREAK shailajaa.
               EXPORT t_return  to MEMORY ID '123'.
               EXPORT V_MATERIAL TO MEMORY ID 'MAT'.
                CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
         EXPORTING
           WAIT          = ' '.
    *ENDFORM.

  • 'Maintain serial numbers for total quantity error in bapi_goodsmvt_create

    HI Experts,
    I am doing a goods movement programatically by using BAPI_GOODSMVT_CREATE.
    Though I am passing the serial no. for the document item still I am getting an error: 'Maintain serial numbers for total quantity'.
    My code goes like this:
    *-- Read all the items for the item category belonging to the plant
         loop at lt_lips into lw_lips where pstyv is not initial.
    *-- Process the goods movement -  Fill the data
              lw_gmvt-material = lw_lips-matnr.
              lw_gmvt-plant = lw_cat-werks.
              lw_gmvt-stge_loc = lw_cat-lgort.
              lw_gmvt-batch = lw_lips-charg.
              lw_gmvt-move_type = lw_cat-bwlvs.
              lw_gmvt-customer = <st_xvbpa>-kunnr.
              lw_gmvt-s_ord_item = lw_lips-posnr.
              lw_gmvt-entry_qnt = lw_lips-lfimg.
              lw_gmvt-entry_uom = lw_lips-meins.
              lw_gmvt-entry_uom_iso = lw_lips-meins.
             lw_gmvt-ref_doc = xlikp-vbeln.
              lw_gmvt-quantity = lw_lips-lfimg.
              lw_gmvt-base_uom = lw_lips-meins.
              append lw_gmvt to lt_gmvt.
              clear: lw_gmvt.
    BOC for serial numbers
              if lt_ser02 is not initial and lt_objk is not initial.
                clear: lw_ser02,
                       lw_objk.
                read table lt_ser02 into lw_ser02 with key sdaufnr = cvbak-vbeln
                                                           posnr = lw_lips-posnr
                                                           sd_postyp = lw_lips-pstyv binary search.
                if sy-subrc = 0.
                  read table lt_objk into lw_objk with key obknr = lw_ser02-obknr binary search.
                  if sy-subrc = 0.
    *-- Check if serial number is populated
                  if lw_objk-sernr is not initial.
    *-- Fill the serial number table for BAPI movement
                      clear: lw_sno.
                      lw_sno-matdoc_itm = lw_lips-posnr.
                      lw_sno-serialno = lw_objk-sernr.
                      append lw_sno to lt_sno.
                  endif. "Serial number not initial
                  endif. "OBJK read
                endif. "SER02 read
              endif. "SER02 and OBJK is not initial
    EOC for serial numbers
            endif. "Category table read
            clear: lw_cat, lw_lips.
         endloop.
    *-- Execute the BAPI only if item table is filled on the above condition
         if lt_gmvt is not initial.
    *-- Fill the header details
            lw_header-pstng_date = xlikp-erdat.
            lw_code-gm_code = lc_03.
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
              EXPORTING
                GOODSMVT_HEADER               = lw_header
                GOODSMVT_CODE                 = lw_code
               IMPORTING
                MATERIALDOCUMENT              = lv_mblnr
                MATDOCUMENTYEAR               = lv_mjahr
              TABLES
                GOODSMVT_ITEM                 = lt_gmvt
                GOODSMVT_SERIALNUMBER         = lt_sno
                RETURN                        = lt_return.
    Please suggest.
    Regards,
    Sangeeta.

    Hi Banerjee,
    Actually we are trying to use the same bapi from se37, we are passing all the details which is required to process the bapi_goodmvt_create. But still the bapi returning the same error what sangeeta got in the above. Can you please guide me how to achieve this.
    how the values has to pass to the Serial Number?
    What exactly meant by Counter Values ?
    Regards,
    Siva

  • Maintain serial number for total quantity" error in BAPI_GOODSMVT_CREATE

    Hi!
    I also encountered the error "Maintain serial number for total quantity" in using BAPI_GOODSMVT_CREATE .
    In retrieving the serial number, I use this code:
    Select all
            READ TABLE l_it_ser03 ASSIGNING <ser03> WITH KEY mblnr = <gm_items>-mat_doc
                                                             mjahr = <gm_items>-doc_year
                                                             zeile = <gm_items>-matdoc_itm.
            IF sy-subrc is INITIAL.
              MOVE:
                <gm_items>-matdoc_itm TO l_wa_goodsmvt_sernum-matdoc_itm,
                <ser03>-sernr         TO l_wa_goodsmvt_sernum-serialno.
                APPEND l_wa_goodsmvt_sernum TO l_it_goodsmvt_sernum.
            ENDIF.
    And then i pass the l_it_goodsnvt_sernum to BAPI_GOODSMVT_CREATE.
    The error shows up whenever i tried to execute a PO having the serialised parts from the Goods Issue, but if the GI has no serialized part, the program works well.
    Please, please help.
    Thank you.

    may i know how you solve the issue ?

  • BAPI : Multiple assignment of a line ID error in BAPI_GOODSMVT_CREATE

    Hi All,
    I am using BAPI_GOODSMVT_CREATE  for upload using excel ...........
    but i find error when execute .... Multiple assignment of a line ID
    anyone know about this..........
    Thanks in advance
    Santosh

    which movement type you are using and wht is your movement indicator?

  • Bapi error in BAPI_GOODSMVT_CREATE

    HI friends ,
    i am using BAPI_GOODSMVT_CREATE for migo using movement type 101 . but it is always throughing
    same error  'Goods movement not possible with mvmt type 101' . i am unable to understand the actual cause of this error . what should i do shall we have to use any other bapi for this . plz help me regarding this .
    Thanks ,
    Amit Ranjan

    HI FRIEND ,
    thanks for your prompt reply .  i have used   goodsmvt_item-mvt_ind = 'B'  but the error is still there .
    i am sending u my whole program for better understanding .
    *& Report  ZBAP
    REPORT  ZBAP.
    parameters: xpost like sy-datum default sy-datum.
    data: begin of gmhead.
            include structure bapi2017_gm_head_01.
    data: end of gmhead.
    data: begin of gmcode.
            include structure bapi2017_gm_code.
    data: end of gmcode.
    data: begin of mthead.
            include structure bapi2017_gm_head_ret.
    data: end of mthead.
    data: begin of itab occurs 100.
            include structure bapi2017_gm_item_create.
    data: end of itab.
    data: begin of errmsg occurs 10.
            include structure bapiret2.
    data: end of errmsg.
    data: wmenge like iseg-menge,
          errflag.
    data: begin of pcitab occurs 100,
            ext_doc(10),           "External Document Number
            mvt_type(3),           "Movement Type
            doc_date(8),           "Document Date
            post_date(8),          "Posting Date
            plant(4),              "Plant
            material(18),          "Material Number
            qty(13),               "Quantity
            recv_loc(4),           "Receiving Location
            issue_loc(4),          "Issuing   Location
            pur_doc(10),           "Purchase Document No
            po_item(3),            "Purchase Document Item No
            del_no(10),            "Delivery Purchase Order Number
            del_item(3),           "Delivery Item
            prod_doc(10),          "Production Document No
            scrap_reason(10),      "Scrap Reason
            upd_sta(1),            "Update Status
          end of pcitab.
    call function 'WS_UPLOAD'
      exporting
        filename                      = 'c:\migo.txt'
        filetype                      = 'DAT'
    IMPORTING
      FILELENGTH                    =
      tables
        data_tab                      = pcitab
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      OTHERS                        = 6
    if sy-subrc <> 0.
      message id sy-msgid type sy-msgty number sy-msgno
              with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      exit.
    endif.
    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
    loop at pcitab.
      itab-move_type  = pcitab-mvt_type.
      itab-mvt_ind    = 'B'.
      itab-plant      = pcitab-plant.
      itab-material   = pcitab-material.
      itab-entry_qnt  = pcitab-qty.
      itab-move_stloc = pcitab-recv_loc.
      itab-stge_loc   = pcitab-issue_loc.
      itab-po_number  = pcitab-pur_doc.
      itab-po_item    = pcitab-po_item.
      concatenate pcitab-del_no pcitab-del_item into itab-item_text.
      itab-move_reas  = pcitab-scrap_reason.
    append itab.
    endloop.
    call function 'BAPI_GOODSMVT_CREATE'
      exporting
        goodsmvt_header             = gmhead
        goodsmvt_code               = '03'
      TESTRUN                     = ' '
    IMPORTING
        goodsmvt_headret            = mthead
      MATERIALDOCUMENT            =
      MATDOCUMENTYEAR             =
      tables
        goodsmvt_item               = itab
      GOODSMVT_SERIALNUMBER       =
        return                      = errmsg .
    clear errflag.
    loop at errmsg.
      if errmsg-type eq 'E'.
        write:/'Error in function', errmsg-message.
        errflag = 'X'.
      else.
        write:/ errmsg-message.
      endif.
    endloop.
    if errflag is initial.
      commit work and wait.
      if sy-subrc ne 0.
        write:/ 'Error in updating'.
        exit.
      else.
        write:/ mthead-mat_doc, mthead-doc_year.
      endif.
    endif.
    PLZ check it and telll me where is the fault .
    Thanks ,
    Amit Ranjan

  • Error in  BAPI_GOODSMVT_CREATE with movement type *261'  after posting

    Hi All,
    After sucessfull posting of  BAPI_GOODSMVT_CREATE  with movement type *261' .
    After posting ,while checking In mb51 document exists for it but checking in mmbe stock not reduced from resisticted stock.
    Can you kindly tell the import parameter to be filled to over come this error.
    Thank you.
    Thanks,
    AMS

    Hi Himanshu/ Tejaswini Khante / Madhu,
    Thank you all for your kind reply.
    @Himanshu....I have tried with LWA_ITEM-STCK_TYPE = BLANK, Still it didnt work.
    @Tejaswini Khante ...I checked the MMBE tcode, all the stocks are in 'Unrestricted use' only. The quality inspection, reserved fields are all blank. The materials are not Batch managed.
    @Madhu...Yes, i discussed with the Functional, yet to find a possible solution.
    Thanks & Regards
    Rajesh

  • Error In BAPI_GOODSMVT_CREATE (M7018 Enter Storage Location)

    I am using BAPI_GOODSMVT_CREATE For GR. (ERROR Message - M7018 Enter Storage Location)
    Parrameters passed are as follows
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
    EXPORTING
    goodsmvt_header = gwa_gm_head
    goodsmvt_code = gwa_gm_code
    IMPORTING
    goodsmvt_headret = gwa_gm_head_ret
    materialdocument = l_mat_doc
    matdocumentyear = l_doc_year
    TABLES
    goodsmvt_item = git_gm_item
    return = git_return.
    gwa_gm_head-PSTNG_DATE 08.09.2011
    gwa_gm_head-DOC_DATE 08.09.2011
    gwa_gm_head-REF_DOC_NO 90000220
    gwa_gm_code-gm_code = '01'.
    gwa_gm_item-MATERIAL 10000087004
    gwa_gm_item-PLANT D102
    gwa_gm_item-STGE_LOC 1000
    gwa_gm_item-ENTRY_QNT 2,000
    gwa_gm_item-ENTRY_UOM EA
    gwa_gm_item-PO_PR_QNT 2,000
    gwa_gm_item-ORDERPR_UN EA
    gwa_gm_item-PO_NUMBER 5100000134
    gwa_gm_item-PO_ITEM 00010
    gwa_gm_item-MVT_IND B
    gwa_gm_item-DELIV_NUMB 80000423
    gwa_gm_item-DELIV_ITEM 000010
    Moderator message : Duplicate post locked.
    Edited by: Vinod Kumar on Sep 8, 2011 5:15 PM

    Hi,
      One of the things that can cause this is incorrect storage location.
    Regards,
    Himanshu

  • Error M7019 BAPI_GOODSMVT_CREATE - Subcontracting process

    Hi,
    I am developing a subcontracting process and using the BAPI_GOODSMVT_CREATE to return the goods, but when I do the low inputs (mov 543) the BAPI returns the following message.
    TYPE       E
    ID               M7
    NUMBER      19
    MESSAGE Combination of movement type 543  and function selected not possible
    LOG_NO     
    LOG_MSG_NO     0
    MESSAGE_V1        543
    MESSAGE_V2     
    MESSAGE_V3     
    MESSAGE_V4     
    PARAMETER            GOODSMVT_ITEM
    I'm using GOODSMVT_CODE = "07" (MB04).
    When I run the same procedure via transaction MB04 I can create the document.
    Has anyone experienced this? Would have any suggestions?
    Thanks
    Sandra Avila

    Hi,
    Successfully execute the BAPI using the help of SAP
    http://wiki.sdn.sap.com/wiki/display/ERPSCM/HowToGoodsMovementswith+BAPI#HowToGoodsMovementswithBAPI-MoreinformationonLINEIDandPARENTID
    Thanks to all
    Sandra Avila

  • JCO Return Type error for BAPI_GOODSMVT_CREATE

    I'm working against a 4.6c instance using the BAPI_GOODSMVT_CREATE to do a 261 movement type.  When running through Xacute, I am getting the attached Return message:
    <RETURN>
    <item>
    <TYPE>E</TYPE>
    <ID>M3</ID>
    <NUMBER>351</NUMBER>
    <MESSAGE>Material not maintained in plant 0066</MESSAGE>
    <LOG_NO />
    <LOG_MSG_NO>000000</LOG_MSG_NO>
    <MESSAGE_V1 />
    <MESSAGE_V2>0066</MESSAGE_V2>
    <MESSAGE_V3 />
    <MESSAGE_V4 />
    <PARAMETER>GOODSMVT_ITEM</PARAMETER>
    <ROW>1</ROW>
    <FIELD />
    <SYSTEM>QAS150</SYSTEM>
    </item>
    </RETURN>
    I know for sure that this item is maintained in this plant as I can perform the 261 through SAP GUI and through ABAP.  Has anyone else run into this problem?  There is an OSS note (570790) for this BAPI, but I think this patch has already been applied.

    Hi Rick - thanks for your quick response.
    I'm fairly confident I have the right config as I can do other BAPIs without any problems.  I did check the material number as well; it is zero padded correctly - again I believe.
    I could be wrong.  I have someone looking into the patch in the OSS note.  Perhaps that is the answer.

  • Getting error while calling two BAPIs

    Dear ABAPers,
    I'm stuck into a problem.
    I have a situation where I'm using BAPI, WS_DELIVERY_UPDATE to update a delivery.
    Then after this I have post a GR so for that I'm using BAPI_GOODSMVT_CREATE.
    Now my problem is when I'm calling BAPI_GOODSMVT_CREATE it gives me an error
    "CODE is not supported by BAPI2017_GOODSMVT_CREATE". I check my code thoroughly, but didn't find anything in that
    which was wrong.
    Again, if I try to do the same, in debugging mode, its processes me in the way it should, without any error.
    Also, If I use a hard coded DELAY of 2 mins, in my program after WS_DELIVERY_UPDATE, it again processes perfectly.
    Now I've put COMMIT AND WAIT and FM DEQUEUE_ALL after WS_DELIVERY_UPDATE, but still not working, and this I'm getting
    error from BAPI_GOODSMVT_CREATE - "No Items Transfered".
    Please help me sort this issue.
    Regards,
    Varun

    Hi varunchopra,
    the SAP documentation is not 100 % clear here: They say, with COMMIT WORK all high-priority ("VB1") update function modules are executed in the order of their registration and in a shared database LUW.  With WAIT addition, the calling program will continue after the update work process has executed the VB1 function modules.
    Probably BAPI_WS_DELIVERY_UPDATE will also trigger one or more VB2 update functions that will keep the objects locked.
    Ten years ago we used this code in a similar situation to wait for the update task for a material being changed:
    FORM WAIT_UPDATE.
      USING P_MAX_WAIT_SECONDS TYPE I
      CHANGING P_SUBRC LIKE SY-SUBRC.
      DATA:
      L_ENDTIME LIKE SY-UZEIT,
      L_TABIX LIKE SY-TABIX,
      L_TRIES TYPE I,
      L_SUCCESS LIKE SY-SUBRC,
      L_ANSW TYPE C,
      L_TRY_AGAIN LIKE RMCLS-XFLAG VALUE 'X'.
      GET TIME.
      L_ENDTIME = SY-UZEIT.
      ADD P_MAX_WAIT_SECONDS TO L_ENDTIME.
      WHILE L_TRY_AGAIN = 'X'.
        LOOP AT ITAB.
          PERFORM CHECK_LOCK_EMMARCE
            USING ZAUF-WERKS ITAB-MATNR CHANGING P_SUBRC.
          GET TIME.
          IF P_SUBRC <> 0 OR SY-UZEIT >= L_ENDTIME.
            EXIT.                          "Loop
          ENDIF.                           " sy-subrc = 0.
        ENDLOOP.                           " AT itab.
        IF P_SUBRC = 0.
          CLEAR: L_TRY_AGAIN.
        ELSE.
          IF SY-UZEIT >= L_ENDTIME .
            PERFORM POPUP_TO_CONFIRM_WAIT
              USING P_MAX_WAIT_SECONDS CHANGING L_ENDTIME P_SUBRC.
            IF P_SUBRC <> 0.
              CLEAR L_TRY_AGAIN.
            ELSE.
              CLEAR P_SUBRC.
            ENDIF.                         " p_subrc <> 0.
          ENDIF.                           " sy-uzeit >= l_endtime.
        ENDIF.                             " p_subrc = 0.
      ENDWHILE.                            " l_try_again = 'X'.
    ENDFORM.                               " WAIT_UPDATE
    The coding of CHECK_LOCK_EMMARCE was derived from SM12 lock overview and used FUNCTION 'ENQUE_READ'. Today I would just try to lock the object with ENQUEUE function - if you get foreign lock error, the updatze task lock is not yet released.
    Monitor SM12 during test run to identify which lock object  must be checked.
    The you have to decide: If you put a WAIT UP TO 1 SECONDS in the wait loop, you may lose up to 1 second per delivery. If you just LOOP until the locks are released you may put some non-necessary load on the machine.
    This way will be faster than any unconditional wait - which may sometimes not be long enough.
    Regards,
    Clemens

  • BAPI_GOODSMVT_CREATE for movement type 161, issues in PO creation

    Hello Gurus,
    I am using movement type 161 with BAPI_GOODSMVT_CREATE in order creating a vendor PO based on the goods receipt posted with the BAPI.
    It works fine, nevertheless due to business requirements, I need to apply the following changes:
    - in SAP standard the order type is NB by default but in our case I would like to force another order type using the same range that NB. I guess this could be done by activating exit ZXM06U17 (MM06E003). Does someone could confirm it?
    - in our process, the purchasing group is not maintained at vendor level (LFM1-EKGRP) but as this field is mandatory in the PO creation and as this data can not be maintained in BAPI_GOODSMVT_CREATE, does someone know if it would be possible to force this value during the PO creation (EKKO-EKGRP) based on a maintenance table? If yes in which user-exit? Exit ZM06U43 could be used?
    - furthermore, our specific PO type should have a specific account assignement EKPO-KNTTP instead of the default value U, does someone know if it would be possible to force this value during the PO creation (EKKO-EKGRP) based on a maintenance table? If yes in which user-exit? Exit ZM06U43 could be used?
    Kind regards
    Chris

    Hi Priya,
    Just want to share with your guys how to fit this error in BAPI_GOODSMVT_CREATE.
      For movement type 161 of PO return you have to pass movement type 101 instead of 161
    goodsmvt_item-bwart = 101. After that standard function will determine 101 to 161 automatically and
    post that material doc.
    NOTE:
      In my case
      It just heppen only the FIRST time that you do movement with PO Return wich is needed to pass
    101 in stead of 161 but after that you can pass 161 the system will continue process correctly.
    Hope it help.
    Sayan.

  • During PGI for inbound delivery it is giving an error message in ECC6.0

    I am getting an error message  during processing a serialized production order through one custom transaction. In that program FM BAPI_GOODSMVT_CREATE is used to create inbound delivery . After the inbound delivery is created it is giving  error messages
    'System status ESTO is Active (EQUXXXXXX)'
    'Check the status of the Serial Number XXXXXXX'
    'Serial Number cannot be used here'
    'Termination of goods issue posting of delivery item XXXXX'
    and it does not create the PGI for the delivery.
    I have done the same steps in 4.7 system but did not get any error and posting of goods issue has also done successfully but in ECC6.0 system I am getting this error from BAPI_GOODSMVT_CREATE.
    If anyone have faced this issue in ECC6.0 then please help.....

    ESTO means "in the warehouse".  Looks like you may be trying to receive a serial no. you already have received?

Maybe you are looking for

  • UK Tax on Sales/Purchases; why open items are shown in S_ALR_87009895?

    Hi, I am not used with the Tax on Sales/Purchases UK authorities but as far as I know, only closed (paid) items must be reported in the Tax on Sales/Purchases report. I expected that the report S_ALR_87009895 - Advance Return for Tax on Sales/Purchas

  • Image shift in PDF's

    I have a logo, it's a styleized letter L in a psd file. When I output it from an InDesign document to postscript file and run it through Distiller the file shifts slightly so that it looks like a path with the points not perfectly in line. I've check

  • Convert server time to local in mscrm 2011

    Hi ,  I am getting 9hours variation and it is taking some cannada time and I want to convert it into local time  . This is my temporary solution  when I selected timezone format(i.e in options) as india it  is working fine but when I changed my timez

  • How can I reinstall the new iPhoto

    I just downloaded and installed Mavericks - not too bad a process. I kep trying to upgrade to the new iPhoto 9.5 and it failed to show up. Since I have few pictures on this MacBook Pro I decided to delete the old iPhoto - purchased apps shows that th

  • XI/CCM Docs

    Hi, I am going to need to configure CCM and the corresponding integration scenarios in XI if needed. I'm looking for someone I can talk to briefly about it. I am not too concerned about implementing the standard content for XI, but I can't find any g