Batch in BAPI_GOODSMVT_CREATE

HI,
I'm doing an movement type '101' in BAPI_GOODSMVT_CREATE, for a material that does not have batch management. I'm not filling the BATCH field in table GOODSMVT_ITEM.
Howhever the batch is being automatically filled with a batch number. The batch number is equal to the valuation type
Does anybody know what may I do to do not fill the batch number ?
May the problem be caused by customizing ?
Thanks in advance,
Paulo Sousa

Hi Raymond,
We do not have serial number. Do you have any other idea ?
Anyway, I will follow your sugestion and post the message in MM.
Thanks,
Paulo Sousa

Similar Messages

  • BAPI_GOODSMVT_CREATE, will do the goods receipt ( MB01 )for the subcontracting PO with batch management.

    Dear Professionals ,
    I Just want to confirm that whether BAPI "BAPI_GOODSMVT_CREATE " will do the goods receipt ( MB01 ) for the subcontracting PO with batch management.
    Since I will be passing only 101 mvy type in BAPi, will the system automatically call 543 mvt type with batch management and post the consumption.
    can I change the batch of the component items ?

    Hi ,
            Delivery note is like a ref document number
    so you can use the
    In the BAPI_GOODSMVT_CREATE There is header structure BAPI2017_GM_HEAD_01 which has a field REF_DOC_NO
    you can pass the delivery note value to that field .
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Jul 10, 2008 3:41 PM

  • Batch determination and BAPI_GOODSMVT_CREATE

    Hi experts!
    I'm new to batch determination and I'm facing an issue. I've set up a batch determination configuration and it works fine when I post a goods movement in dialog process (MB11) entering * in the batch field.
    Now I'm trying to do the same with BAPI_GOODSMVT_CREATE, but if I enter * in the batch parameter I get an error message M7116: "The storage location/batch function * is not defined here". If I leave it blank i get the error message "Enter batch".
    Hope somebody has any clue.
    Thanks
    Fabio Scaravelli

    Hi Fabio,
    I'm facing the same problem. Did you get a solution to this problem? Please let me know.
    Thanks.

  • BAPI_GOODSMVT_CREATE and Batch Determination

    Hi experts!
    I'm new to batch determination and I'm facing an issue. I've set up a batch determination configuration and it works fine when I post a goods issue in dialog process (MB1A) entering * in the batch field.
    Now I'm trying to do the same with BAPI_GOODSMVT_CREATE, but if I enter * in the batch parameter I get an error message M7116: "The storage location/batch function * is not defined here". If I leave it blank i get the error message "Enter batch".
    Hope somebody has any clue.
    Thanks

    Hi,
    If your material is "batch managed" you have to supply the bacth number in BAPI.
    The BAPI does not search automatically for a batch number like MB1A.
    Best regards,
    Leandro Mengue

  • Multiple execution of BAPI_GOODSMVT_CREATE for same batch.

    Hi all,
    I use bapi_goodsmvt_create in IDOC to transfer from one storage location to another.
    We use WM.
    Example:
    We want to move batch1 from storage location x1 to x2
    These are the steps I do.
    Call function bapi_goodsmvt_create to move from x1 to TR-ZONE.
    Then we call function bapi_goodsmvt_create to move from TR-ZONE to x2.
    Both calls come back without error.
    In WM the first movement from x1 to TR-ZONE does not get completed before
    the call to move from TR-ZONE to x2.
    The transfer order does not complete before the second call.
    This leaves the batch 1 in TR-ZONE because the second call did not find the batch 1 in TR-ZONE in WM.
    Help would be appreciated.
    Regards!
    Curtis

    HI ...
    Since this is a production order ,i used the GM code as '02'.bcoz the documentation says the same .
    There are the following types of transactions/events:
    1. GM_Code 01: Goods receipt for purchase order
    2. GM_Code 02: Goods receipt for production order
    3. GM_Code 03: Goods issue
    4. GM_Code 04: Transfer posting
    i also tried changing it to '01' ,its not working still...
    Pls reply
    Thanks .

  • Documentary Batch Field for Line item when calling BAPI_GOODSMVT_CREATE

    hi all,
    Iam unable to locate the Documentary Batch Field for each line item while posting a Goods Issue using BAPI BAPI_GOODSMVT_CREATE.
    BAPI2017_GM_ITEM_CREATE structure has got no field to enter the DB number against each line item. Although its not a mandatory field while posting a goods issue when calling the BAPI, but there shud be a input field for the same. When doing a similar posting in SAP using MIGO transaction it's mandatory to enter a Documentary Batch number(SAP Field name DOCUBATCH_CHARG). Does anyone have come across this situation. Is there a field with different name in the  BAPI2017_GM_ITEM_CREATE structure ? Appreciate your thoughts !
    Regards,
    Gilmour

    Hi Vindy,
    bapi2017_gm_item_create-batch is the field for the Batch.
    However Iam looking for a field called DB No which is basically a Documentary batch ensure the traceability of a material, without it being necessary for the stock of the material to be managed in batches. If you look at the Item section in MIGO you would have Batch and DB No for each line item and Iam looking for the DB no and not the primary Batch.
    Thanks,
    Gilmour

  • BAPI_GOODSMVT_CREATE - batch

    hi ,
    Im using BAPI_GOODSMVT_CREATE for stock transfer posting.
    Here there is a batch field to be passed.
    what value should we pass here.
    i checked MCH1 table but it consists of multiple batches for a material.
    what is the exact way to proceed with this.

    Hi Keshu..
    The BAPI BAPI_GOODSMVT_CREATE  will work as same as MIGO. what ever the process is possible using MIGO is possible using This BAPI also.
    When you do Transfer posting, you need to pass two batch numbers...means From and to bacth Number.
    let me know if you need any further clarifciation.
    cheers,
    JBR

  • BATCH in Material Doc - MSEG-CHARG, BAPI_GOODSMVT_CREATE??

    HI Experts,
    I got a requirement like,
    Threre is a item 10 of qty 5, in a delivery, its batch is BATCH SPLIT.
    I need to create a material document from this delivery/item.
    So, currently material doc is creating via BAPI_GOODSMVT_CREATE from this delivery, fine, but, when come to BATCH.........ONLY the last batch of delivery item 10, is coming over/populating in MSEG-CHARG..........but, I need to bring all the batches of the item of the delievry into materail doc.........so,
    (In this BAPI, I can see the goodsmvt_serialnumber for serial #s fine.)
    1- for when coming to batch issue, Is I need to populate the goodsmvt_item table for EACH BATCH as a seperate item/record in this table , for the same 10 item of delivery?
    I mean, Is I need to create a ITEM/record in Materail doc - MSEG tbl, for every BATCH of item 10 of delievry?
    replies appreciated
    thanq
    Edited by: SAP ABAPer on Oct 29, 2008 6:06 PM

    i clarified from my other func guy, answer is YES

  • BAPI_GOODSMVT_CREATE, and automatic batch numbers

    Hello,
    I am using BAPI_GOODSMVT_CREATE and doing good receipt vs., a Purchase Order, GM 01.    The material is auto batch managed and I see the batches are generated when I go into MSEG for the good receipt line items.   However, batch numbers are not returned in the bapi return information.
    Is there a way to get the batch numbers to return in the BAPI_GOODSMVT_CREATE bapi?  If so, please let me know.  If not, please also let me know and I will do a subsequent look-up to get that info.
    Thanks

    BAPI_GOODSMVT_CREATE will return the material document number posted. Use that to get the batch number from table MSEG.
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
      EXPORTING
        GOODSMVT_HEADER  = LS_GOODSMVT_HEADER
        GOODSMVT_CODE    = LS_GOODSMVT_CODE
      IMPORTING
        GOODSMVT_HEADRET = LS_GOODSMVT_HEADRET
      TABLES
        GOODSMVT_ITEM    = LT_GOODSMVT_ITEM
        RETURN           = LT_RETURN.
    IF LS_GOODSMVT_HEADRET-MAT_DOC IS NOT INITIAL.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          WAIT   = GC_TRUE
        IMPORTING
          RETURN = LS_RETURN.
      SELECT SINGLE CHARG FROM MSEG INTO LV_CHARG
              WHERE MBLNR EQ LS_GOODSMVT_HEADRET-MAT_DOC
                AND ZEILE EQ '0001'.
    ENDIF.
    *Assumes single item document posted

  • BAPI_GOODSMVT_CREATE - Batch Expiry Date......

    HI Im,
    using this BAPI to post a goods movement from one location to another in the same plant.
    The stock is being posted to a specific Batch.  When I do this the material document gets created okay and the stock moves.
    The problem is that the batch expiry date is not updating.  The stock I'm moving has a later expiry date than the current date.  If I do this manually in MIGO it works fine and updates the batch expiry date with the later date.
    Has anyone else experienced this or know of a work around ?

    Hi
    I am populating the item data like:
    *- Populate item data
      LOOP AT i_items_trans.
        CLEAR ibapigm_item.
    *- Convert the matnr backto 18 char form (External)
        CALL FUNCTION 'CONVERSION_EXIT_MATN2_INPUT'
          EXPORTING
            input            = i_items_trans-matnr
          IMPORTING
            output           = i_items_trans-matnr
          EXCEPTIONS
            number_not_found = 1
            length_error     = 2
            OTHERS           = 3.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        ibapigm_item-material   = i_items_trans-matnr.
        ibapigm_item-plant      = x_user-werks.
        ibapigm_item-stge_loc   = x_user-lgort.
        ibapigm_item-move_type  = '101'.   "Goods Receipt
        ibapigm_item-mvt_ind    = 'B'.     "Goods Movement for PO
        ibapigm_item-po_number  = i_items_trans-ebeln.
        ibapigm_item-po_item    = i_items_trans-ebelp.
        ibapigm_item-gr_rcpt    = sy-uname.
        ibapigm_item-quantity   = i_items_trans-ktmng.
        ibapigm_item-base_uom   = i_items_trans-meins.
        ibapigm_item-entry_qnt  = i_items_trans-ktmng.
        ibapigm_item-entry_uom  = i_items_trans-meins.
        ibapigm_item-batch      = i_items_trans-charg.
        APPEND ibapigm_item.
      ENDLOOP.
    Header data like:
      MOVE: sy-datum TO bapigm_head-pstng_date,
            sy-datum TO bapigm_head-doc_date,
            sy-uname TO bapigm_head-pr_uname,
            v_mblnr  TO bapigm_head-ref_doc_no,
            con_bfwms_bestand TO bapigm_head-ext_wms.
    *- Document Header Text
      IF NOT v_bktxt IS INITIAL.
    *- Preceed "INV=" to the Invoice number entered
        CONCATENATE 'INV='(003) v_bktxt INTO v_bktxt
        SEPARATED BY space.
        bapigm_head-header_txt = v_bktxt.
      ENDIF.
      MOVE gmcode_01 TO bapigm_code-gm_code.
    And calling the BAPI as:
      CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
        EXPORTING
          goodsmvt_header  = bapigm_head
          goodsmvt_code    = bapigm_code
        IMPORTING
          goodsmvt_headret = bapigm_headret
        TABLES
          goodsmvt_item    = ibapigm_item
          return           = ibapigm_ret.
    *- Commit on Success
      IF NOT bapigm_headret-mat_doc IS INITIAL.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      ENDIF.
    Havent faced any problem so far...
    Did you populate <b>EXPIRYDATE</b> in  structure <b>BAPI2017_GM_ITEM_CREATE</b>? If yes, see in debugging, whatz happening to this value.
    Regards,
    Raj

  • BAPI_GOODSMVT_CREATE - How do I get this to create a new batch ?

    I am calling this BAPI :     BAPI_GOODSMVT_CREATE and not passing any value in the batch field
    (GOODSMVT_ITEM-BATCH) and am expecting a new batch number to be created.   This is not the case, the BAPI is proposing a batch number (finding one via MSEG) and erroring due to this. 
    Is there any flag or config to indicate 'create new batch'

    Hi,
    if the material is handled in batches and batch numbers
    are not assigned automatically.
    Regards,
    Nandha

  • BAPI_GOODSMVT_CREATE Classify batch (Like MB1C)

    I'm trying to post a MM documents using Movement Type 561. I have some information to post on Classify batch to some characteristics, but in this BAPI or using recording (SM35) I don't have any fields to fill with this information, using MB1C this fields are open to fill but when I'm using SM35 it is inactive.
    When I call the BAPI it has a error:
    ID: 12126 : Inconsistency in classification data => transaction terminated.
    Regards,
    Alfredo

    Hi,
    If your material is "batch managed" you have to supply the bacth number in BAPI.
    The BAPI does not search automatically for a batch number like MB1A.
    Best regards,
    Leandro Mengue

  • Batch input for BAPI_GOODSMVT_CREATE - Transfer posting

    Hi all,
    I'm now trying to do a batch input in this program for transfer posting of stocks.
    Am i able to upload the input through an external source for example, Excel spreadsheet?
    May i know how do i indicate in the program the source of my batch input?

    Hello Calibertto,
    You can upload excel file for batch input or bapi.
    Firstly : Upload to excel file.
    Secondly : Append itab from excel file.
    Thirdly : Make loop at itab.
    Finally : Fill batch input/bapi for every itab record.
    Best regards.

  • BAPI_GOODSMVT_CREATE - Error while posting a Material Document

    Hi Experts,
    We are  trying to do the material document posting using the transaction "MB1C" manually in SAP. The movement type which we are using for the same is "261".  While doing this is, it is asking for a work order number and the Recipient number. We gave the Recipient Number as "123". Material document is created successfully.
    Again using the same transaction  "MB1C" , we are trying to do the reversal of the material document which we posted previously against another work order number for the same material and the serial number if the material is serialised and as well as for the non serialised material.
    Both this case, in SAP the material document is created succesfully. This is done manually in SAP.
    When we are trying to create the material document using the BAPI 'BAPI_GOODSMVT_CREATE', for the above scenario, posting the material document '261' movement type for one work order and the reversal for another work order '262' movement type for the same material (whether it is a serialised or non serialised) we are getting the eror as "RE Qty. transferred exceeded 1 PC: 50,003,695 C001 USED 1200".
    We are passing the following at the item level. MATERIAL Number, Plant, STGE_LOC, ENTRY_QNT, MOVE_TYPE, BATCH, ORDERID, RESERV_NO,  RES_ITEM, ACTIVITY, XSTOB for reversal.
    We are passing the GM_CODE as '05'.
    Please let us know what needs to be changed inorder to create the material document properly without getting errors.
    Thanks in Advance,
    Mohan.

    Hi,
    We fixed this issue by removing the reservation number of the material when we are trying to post the material document with the movement type "262".
    The reason for removing the reservation number for the movement type "262"
    The reservation number is getting created against a work order when we trying to create the work order in IW32. This reservation number is used for validating the stock while we are trying to consume and doing the reversal.
    SAP is allowing us to reverse the consumed quantities only based on the reservartion number and hence we got this error.
    To fix this error, if we are trying to reverse a particular material against a different work order for which it has been consumed previiously, remove the reservation number and item number and try posting the material document.
    Hope this solution will solve your issue:)
    Thanks and Regards,
    Mohan.

  • Creation of Goods receipt - MB_CREATE_GOODS_MOVEMENT/BAPI_GOODSMVT_CREATE

    Hi Friends,
    I need to create a goods receipt for an inbound delivery.
    Iam planning to use either MB_CREATE_GOODS_MOVEMENT or BAPI_GOODSMVT_CREATE.
    But every time iam getting the error saying that the 101 movement type cant be used.
    In my case i need to use both the movement types 101 and 543.
    Basically i need to populate both the main item and component material information.
    If any one has done this, Can you please give me the sample code.
    Regards
    Sasi

    Hi,
    Iam usig the gm_code as 05.
    I am paasing the movement indicator ,in that particular field.
        lw_goodsmvt_item-material = lw_imseg-matnr.
        lw_goodsmvt_item-plant = lw_imseg-werks.
        lw_goodsmvt_item-batch = lw_imseg-charg.
      IF lw_imseg-sgtxt = 'F'.
        lw_goodsmvt_item-move_type = '101'.
        lw_goodsmvt_item-mvt_ind = 'B'.
        lw_goodsmvt_item-NO_MORE_GR = 1.
        lw_goodsmvt_item-stge_loc = lw_imseg-lgort.
        ELSEIF lw_imseg-sgtxt = 'C'.
        lw_goodsmvt_item-move_type = '543'.
        endif.
        lw_goodsmvt_item-entry_qnt = lw_imseg-erfmg.
        lw_goodsmvt_item-entry_uom = lw_imseg-erfme.
        lw_goodsmvt_item-expirydate = lw_imseg-mhdat.
        lw_goodsmvt_item-DELIV_NUMB =
        lw_goodsmvt_item-DELIV_ITEM =
    am i doing something wrong here.
    iam gettign the following error message
    Goods movement not possible with mvmt type 101
    Goods movement not possible with mvmt type 543

Maybe you are looking for

  • Error message - can't open up current catalog

    I am getting this error out of nowhere. yesterday I could get into Lightroom fine. Then last night I started getting an error that pops-up with a "ringing bell" sound and I have to CTRL ALT DELETE out of the program because none of the buttons work.

  • Getting JTA Error Messages in MII Transaction

    Hi ,            I am using a JTA action block to insert the data in a table. In case this insert statments throws any error (such as primary key violation or column length issue)  I would like to display that error message to the user. Can any one kn

  • How do I add another Screen to my iMac?

    Hello, I am wanting to add an additional screen to my existing iMac. I have heard that there is the Thunderbolt Display (TD) that I can add but before I do that I would like to ask if there is any less expensive directions I can take. I have old moni

  • Why There is no "None" Option when Registering iTunes10.5 Account?

    I really wanted to download free apps for my iTouch without getting a credit card for that matter.. but it seems that the option for "None" is not available for iTunes 10.5.. i don't know what to do.

  • View apple tv on ipod touch

    I read that it can be done but I do not know how? anyone know how? Thanks, Scotty