BAPI BAPI_GOODSMVT_CREATE for Transaction MB01

Hi All,
I am using BAPI BAPI_GOODSMVT_CREATE for transaction MB01.
I have one problem while passing the value in BAPI.
Goods receipts for Schedule Agreements are not allow for delivery schedule lines with delivery date in the future.
Manual turn around for transaction MB01 is to check field "Suggest Zero Lines" from main selection screen:
I am not able to get the field name in BAPI for filling the value for check field "Suggest Zero Lines".
Kindly help me to find out the field name.
Thanks in advance.
Piyush Mathur

data flag(1) value 'X'.
set parameter ID 'NUL' field flag.
u can set the parameter 'Suggest zero lines' as 'X' by default and then call ur bapi..see if tht field is X now or not?
otherwise it can be possible tht u r not using the correct BAPI
amit

Similar Messages

  • BAPI's for Transaction Manager: Is there any BAPI for Stock Options

    Hi gurus,
    We are using almost every BAPI for Transaction Manager module at FSCM-Treasury & Risk Management (ECC 6.0).
    We have forex swaps, forex forwards, forex spot deals, interest rate swaps, cross currency swaps, equity swaps, and we also have a stock options plan.
    We need to use a BAPI to automatically create stock options, importing data from other stock options alreaedy created (manually, by the user) in the system.
    Do you know if there is any specific functionality for this?
    Thanks in advance and kind regards.
    Borja

    Hi Borja,
    if I understand you correct then you want to create a stock option like you can do it manually with the transaction FWZZ. Try the BAPI BAPI_FP_CREATEFROMDATA. With this function module it is possible to create different types of securities like listed options or futures too.
    Regards
    Robert

  • BAPI :"BAPI_GOODSMVT_CREATE" for MB31

    hi all,
    I am using the BAPI "BAPI_GOODSMVT_CREATE" gor goods receipt against Production order .
    Please advise me where i will put the production order no in which field of table "GOODSMVT_ITEM".
    thanks
    Ravi arora

    Hi Ravi,
    Check this field ' ORDERID ' for produciton order, hope this helps.
    regards
    Ramakant

  • Provide the BAPI names for Transactions- IW52 and IW32

    Hi Friends,
    Please provide me with the BAPI Names for the transaction codes: (1) To create the Serivce Order through IW52(by entering the service notification number and (2)  To change the Service order through IW32.
    Thanks a lot in advance.
    Venkat,

    Hi Raghu,
    May I Know if this BAPI is to create the Service order from IW52(through Service notification) or from IW34? Becoz I need the one from IW52 only.
    Thank you very much.
    Regards.
    Venkat

  • Error while using BAPI BAPI_GOODSMVT_CREATE for Momvent type 321

    Hi Guys,
    We trying to transfer material from Inspection to Un.Stock by using momvent type 321...In SAP we do QVM1 and do stock postion.
    We are using BAPI BAPI_GOODSMVT_CREATE getting this error " E QA 495 Change the inspection stock of material 11036125 in QM only".
    Any one have any idea how to overcome this issue.
    Atul

    Hi Sachin,
    Pass the Item Number of Reservation to GOODSMVT_ITEM-RES_ITEM .
    Regards
    DKS

  • FM/BAPI needed for transaction KP06

    Hi folks,
    I need a BAPI/FM for posting using tcode KP06. I am using layout 1-102 Activity Input. I am passing data to cost center, sender cost center and sender activity type group . I need a BAPI to perform its posting which can be seen on the overview screen where we click the 'Line Items' button.
    Please Help.
    Thanks in advance .
    Priyanka Ashtekar

    Didnt  get ur questions..
    be precise..
    Edited by: Manish hadiyel on May 27, 2008 7:47 AM

  • Bapi bapi_goodsmvt_create for goods receipt of process order

    Hello All ,
    I am trying to a GR with MIGO for a process order .Its giving me error like
    Content of order 2000002339: 100001374 transferred to interface (IMSEG): 100001374
    I am not able to trace the error out .I am passing the below parameters .pls check
    gmhead-pstng_date = sy-datum.
    gmhead-doc_date = sy-datum.
    gmhead-pr_uname = sy-uname.
    gmcode-gm_code = '02'.   "01 - MB01 - Goods Receipts for Purchase Order
    itab-move_type  = '101'.
    itab-mvt_ind    = 'F'.
    itab-plant      = '1AAE'.
    itab-material   = '100001374'.
    itab-entry_qnt  = '1'.
    itab-move_stloc = 'B100'.
    itab-stge_loc   = 'B100'.
    itab-orderid  = '002000002339'.
    append itab .
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
      EXPORTING
        goodsmvt_header             = gmhead
        goodsmvt_code               = gmcode
      TESTRUN                     = ' '
    IMPORTING
        goodsmvt_headret            = wa_head
       materialdocument            = lv_mblnr
      MATDOCUMENTYEAR             =
      TABLES
        goodsmvt_item               = itab
      GOODSMVT_SERIALNUMBER       =
        return                      = errmsg
    Pls reply ..
    Thanks .

    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 .

  • How to use BAPI_GOODSMVT_CREATE for MBRL/MB01

    Dear All,
    Im requesting support from you that issue i'm currently facing.
    Normally we are going sub contracting process..
    it means we are issueng raw material to vendor and getting back finish goods from vendor through subconreacting PO.
    When we do the MIGO we are getting the finished good through  movement type 101 and raw materials at vendor location are consumed through movement type 543.
    Above everything is working fine...
    But my problem is reverse the subcontracting PO theough a BAPI..
    In other way i wann implement MBRL or MB01 through a bapi...
    Please let me know  a suitable BAPI and parameters to acomplish this task...
    Thank you...

    Hi Bhaskar,
    Additionally i want to add below error message generated by BAPI_GOODSMVT_CREATE when i'm using 102 movement type.
    E- M7         -     
    389 - Of the required quantity of material SL108, 0.058 KG remain(s) open
    Thank you.

  • BAPI  needed for  transaction CU42

    hi,
    I want to change materials which are having single level BOM to mutilevel. could any body provide a BAPI to do that. i am having around 10000 materials.
    Regards ,
    Ramesh

    Didnt  get ur questions..
    be precise..
    Edited by: Manish hadiyel on May 27, 2008 7:47 AM

  • Update field LSMNG in MIGO transaction using bapi bapi_goodsmvt_create

    Hi ,
       I am using bapi bapi_goodsmvt_create  for creating goods receipt against purchase order in which I have to update field LSMNG i.e. Del. Note Qty. But this field is not there in BAPI input parameters/table fields.
    How i can update this field using the same bapi
    Thanks and regards
    Deepak Sharma

    Hi,
       Can I update this field using BAPI bapi_goodsmvt_create.
    thanks
    Deepak

  • Any BAPI for Transaction "USERS_GEN" in SRM/BBP

    Hi All,
    Is there a BAPI available for transaction USERS_GEN in BBP/SRM?
    I wrote a BDC for this transaction that shows that everything was fine but does not actually update anything. Also, no messages are passed back in MDCMSGCOLL internal table in CALL TRANSACTION.
    Thanks for your help.

    Have a look at OSS note 893714. I don't think it answers your question, but it might help.
    Rob

  • BAPI for transaction FBD1

    Hi,
    Please advise if any BAPI available for transaction FBD1- recurring entry
    Thanks,
    Srinivas

    FBD1 for what ?
    what type of data u want upload
    regards
    Suresh.D

  • BAPI error for mvmt types 201 and 202

    Hi all,
      I'm using a bapi BAPI_GOODSMVT_CREATE for the movement type 201 and 202 with the gm_code = '03' for the transaction mb11- Goods movement. But it returns an error u201D Account 400000 requires an assignment to a CO object u201D...I'm unable to resolve this one....I have attached the code below. Please help me in fixing this issue...
    if sy-subrc = 0.
      loop at it_mchb into wa_mchb.
        if wa_mchb-clabs gt 0.
          clear wa_header.
          wa_header-pstng_date = sy-datum.          " fill header data
          wa_header-doc_date   = sy-datum.
          wa_code-gm_code      = '03'.              "fill code data
          clear wa_item.
          wa_item-material     = wa_mchb-matnr.     " fillitem data
          wa_item-plant        = wa_mchb-werks.
          wa_item-stge_loc     = wa_mchb-lgort.
          wa_item-batch        = wa_mchb-charg.
          wa_item-entry_qnt    = wa_mchb-clabs.
          wa_item-move_type    = '201'.
                       wa_item-entry_uom    = wa_mchb-meins.
          append wa_item to it_item.
        elseif wa_mchb-clabs lt 0.
          clear wa_header.
          wa_header-pstng_date = sy-datum.          " fill header data
          wa_header-doc_date   = sy-datum.
          wa_code-gm_code      = '03'.              "fill code data
          clear wa_item.
          wa_item-material     = wa_mchb-matnr.     " fillitem data
          wa_item-plant        = wa_mchb-werks.
          wa_item-stge_loc     = wa_mchb-lgort.
          wa_item-batch        = wa_mchb-charg.
          wa_item-entry_qnt    = wa_mchb-clabs.
          wa_item-move_type    = '202'.
                       wa_item-entry_uom    = wa_mchb-meins.
          append wa_item to it_item.
        endif.
      endloop.
      clear lv_lin.
      describe table it_item lines lv_lin.
      if lv_lin = 0.
        write : / 'No records found'.
      endif.
      call function 'BAPI_GOODSMVT_CREATE'
        exporting
          goodsmvt_header  = wa_header
          goodsmvt_code    = wa_code
        importing
          materialdocument = lv_matdoc
        tables
          goodsmvt_item    = it_item
          return           = it_return.
      if it_return is initial.        " if record created successfully
        call function 'BAPI_TRANSACTION_COMMIT'. " commit work
        write : / lv_matdoc, 'IS CREATED SUCCESSFULLY' color 5.
        loop at it_item into wa_item.
          write : / 'Mat :', wa_item-material,'bat :', wa_item-batch.
        endloop.
      else.                           " if record is not created successfylly
        loop at it_return into wa_return.
          write : / wa_return-message color 6.
        endloop.
        uline.
      endif.
    else.
      write : / 'No Records found' color 7.
    endif. " gt_s035 is not initial
    Edited by: Arunmozhi_06 on May 30, 2011 12:48 PM

    Hi,
       Did you passing the leading 0's in the cost center field?
    and check the below coding..
    * 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.
      perform show_status using 'Scrapping(551) Material'.
    * 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 xresb-matnr  to gm_item-material.
      move p_bdmng      to gm_item-entry_qnt.
      move xresb-meins  to gm_item-entry_uom.
      move xresb-werks  to gm_item-plant.
      move xresb-lgort  to gm_item-stge_loc.
      move p_grund      to gm_item-move_reas.
    * Determine cost center per plant
      case xresb-werks.
        when '0004'.
          move '0000041430' to gm_item-costcenter."pass leading zero's in the cost center field
        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.
    Maybe there is some config missing for your cost center, or maybe something missing in your code. check above.
    Regards,
    Dhina,..
    Edited by: Dhina DMD on May 31, 2011 8:02 AM

  • Problem with BAPI "BAPI_GOODSMVT_CREATE"

    Hi experts,
    I am using BAPI "BAPI_GOODSMVT_CREATE" for posting goods issue document. I am Providing following fields in the BAPI(According as in my system) :
    *GOODSMVTHEADER*_
            PSTNG_DATE                     27.02.2008
    *GOODSMVTCODE*_
            GM_CODE                        03
    and in tables:
    *GOODSMVTITEM*_
               MATERIAL                       PM-001
               PLANT                             0001
               STGE_LOC                      0001
               MOVE_TYPE                   261
               ENTRY_QNT                    9,000
               ENTRY_UOM_ISO            EA
               RESERV_NO                   0000000026
               RES_ITEM                       0003
    But when i check through transaction "mmbe" it seems BAPI is not working. However there is no return message in BAPI. What could be the error. please help.
    Thanks and Regards,
    Vaibhav Tiwari.

    Hi Vaibhav,
    Running a function module from SE37 is called test run. And a BAPI absolutely needs a COMMIT WORK after it runs because one of the fundamental rules of a BAPI is that there is no COMMIT done internally.
    And to write the changes to database, you need a commit work,
    Hence unfortunately you will have to call the function module BAPI_TRANSACTION_COMMIT.
    Ok, to try it out, you can call BAPI_TRANSACTION_COMMIT immediately after the goods movement BAPI by:
    Go to SE37 -> Shift + F8 -> Enter the two function modules in sequence (first goods movement then commit FM)
    Then run and check.
    Cheers
    Edited by: Aditya Laud on Feb 28, 2008 5:18 AM

  • BAPI  ' 'BAPI_GOODSMVT_CREATE''

    Hi All,
    I am using BAPI ''BAPI_GOODSMVT_CREATE' for posting goods receipt for 161 movement tpye.
    with this BAPI , Material document is generated, but Qty in delivery note and Unit is not getting updated. When i see MIGO in display mode it is showing 1)  Qty in delivery note as
    '0.000' and unit is blank even if i am passing both paramters to item level.
    Following is the code 
    Data : p_meins(3),
              p_ENTRY_QNT like BAPI2017_GM_ITEM_CREATE-ENTRY_QNT.
      wa_goodsmvt_item-entry_qnt = p_ENTRY_QNT.
      wa_goodsmvt_item-entry_uom = p_meins.
      CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
        EXPORTING
          goodsmvt_header             = goodsmvt_header
          goodsmvt_code               = goodsmvt_code
      TESTRUN                     = ' '
       IMPORTING
      GOODSMVT_HEADRET            =
         materialdocument            = g_mblnr  " materialdocument
      MATDOCUMENTYEAR             =
        TABLES
          goodsmvt_item               = goodsmvt_item
      GOODSMVT_SERIALNUMBER       =
          return                      = return1
    Please give me solution . Tell me which parameters should i pass for Qty in Del note & unit.
    Regards.
    ulhas

    Please take a look at this links for sample coding of BAPI_GOODSMVT_CREATE.
    http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm
    http://www.4ap.de/abap/bapi_goodsmvt_create.php
    Check out the following program,
    BAPI_GOODSMVT_CREATE to post Goods Movement
    code*BAPI TO Upload Inventory Data
    GMCODE Table T158G - 01 - MB01 - Goods Receipts for Purchase Order
    02 - MB31 - Goods Receipts for Prod Order
    03 - MB1A - Goods Issue
    04 - MB1B - Transfer Posting
    05 - MB1C - Enter Other Goods Receipt
    06 - MB11
    Domain: KZBEW - Movement Indicator
    Goods movement w/o reference
    B - Goods movement for purchase order
    F - Goods movement for production order
    L - Goods movement for delivery note
    K - Goods movement for kanban requirement (WM - internal only)
    O - Subsequent adjustment of "material-provided" consumption
    W - Subsequent adjustment of proportion/product unit material
    report zbapi_goodsmovement.
    parameters: p-file like rlgrap-filename default
    'c:\sapdata\TEST.txt'.
    parameters: e-file like rlgrap-filename default
    'c:\sapdata\gdsmvterror.txt'.
    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 = p-file
    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.
    loop at itab.
    write:/ itab-material, itab-plant, itab-stge_loc,
    itab-move_type, itab-entry_qnt, itab-entry_uom,
    itab-entry_uom_iso, itab-po_number, itab-po_item,
    pcitab-ext_doc.
    endloop.
    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
    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.
    perform upd_sta.
    endif.
    endif.
    FORM UPD_STA *
    form upd_sta.
    loop at pcitab.
    pcitab-upd_sta = 'X'.
    modify pcitab.
    endloop.
    call function 'WS_DOWNLOAD'
    exporting
    filename = p-file
    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
    endform.
    End of Program[/code]
    http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm
    Take a look at the sample code provided by Rich in the thread below
    Re: BAPI_GOODSMVT_CREATE
    Please award points if found helpful.

Maybe you are looking for

  • Open Sales Balance on Sales order

    Hi SAP Group - I have a couple questions about the settlement of manufacturing variance to COPA. When our settlement process is complete (production order and sales order both settled to COPA), there is a balance remaining on the sales order cost rep

  • Exsice tab not display in migo transaction

    Dear All, for this error i got one note  1079123, i am using Ecc 6.0 Ehp4. when my basis person is going to apply that patch, that time he is telling me this will not applicable for EHP4, this will use only in 602 version... can any body help me.....

  • Need troubleshooting advice for osx 10.3.9

    Not sure of how, but system was changed in a subaccount (main account not affected) Subaccount now opens with different icons, not running all applications and several items are gone like mail connections, address book, and bookmarks. need to know ho

  • Network Extender is awesome!!!!

    The network extender has enabled me to go from a signal that ranged from -97dBm to -102-dBm, to around-64dBm to  -78dBm. For the first time since December 2007 when I moved to my new home.  I can make and receive calls in my home without asking the c

  • Genius gallery Widget

    I am trying to get Genius gallery Widget into Muse but no matter how many times I try it wont appear