Freight vendor updation in GR document through BAPI

Dear All
In my system we are creating Goods Receipt in background through *BAPI BAPI_GOODSMVT_CREATE*. In my PO we have entered freight condition FRB1 for that PO line item and assigned a vendor code different from material vendor. For this freight condition FRB1 in the configuration we have maintained in Control Data 2 field Vendor in GR as 2 ( i.e. Entry always possible). This will help us to change freight vendor different from freight vendor maintained in PO line item.
Now my query is that how can I achieve this through BAPI  BAPI BAPI_GOODSMVT_CREATE when I am creating GR in background. In which field of BAPI should we pass the freight vendor at the time of GR creation.
Regards
Satish Kumar

Hi Satish,
With standard SAP this is not Possible
As indicated in the attached note 356665, the field SUPPL_VEND has no
function. Please, have a look at this note for further information.
In dialog (with MB01 or MIGO) you have the possibility to enter another
freight vendor different than the vendor in your purchase order (or your
scheduling agreement) as long as you have, in your purchasing condition
type, "Vendor in GR" (V_T685A-BNKWE) maintained with the appropiate
value. Then, by posting the Goods Receipt, you will update EKBZ with
this new freight vendor.
Unfortunately in the standard system this functionality is not available
when working with the BAPI BAPI_GOODSMVT_CREATE or with the Idoc
WMMBID02.
There is no customizing setting or tool that you could use inside the
standard system to change it.

Similar Messages

  • How to update Assignment field in Accounting Document through BAPI ?

    I need to change Assignment field in already posted accounting document through bapi or some other automatic method. Please tell me exactly which bapi I should use and how can I pass the changed assignment field?

    Hey,
    I couldnt find any BAPIs which update an accounting document. I think the safest way is to record FB02 and use BDC/Call Transaction.
    -Kiran
    *Please reward useful answers

  • Function Module to Update Shipment Cost Document through Idoc.....?

    Is there any EDI function module which can Update Shipment Cost Document through Idoc.....

    Hi Vijendra,
    Welcome to SDN.
    You can use FM IDOC_INPUT_SHPMNT with message SHPMNT and IDoc type SHPMNT01/02/03/04/05 to update shipment document.
    Hope this will help.
    Regards,
    Ferry Lianto
    Please reward points if very helpful.

  • How to create shipment cost document through BAPI?

    Hi SAP Guru,
    My requirement is to create shipment cost document through BAPI.
    Is there any standard BAPI to create Shipment cost documents? If any buddy no please help me out.I am in client place i have find out the solution..
    Thanks & Regards,
    Pankaj Sinha

    Hi Pankaj,
    See the following link for more help.
    IDOC/BAPI for changing Shipment cost number/document
    Regards

  • Need Code For PO-GR through MiGO for multiple documents through BAPI

    Hi All
    Im using BAPI_GOODSMVT_CREATE to post goods for PO-GR.
    When im posting multiple documents its giving error.
    When im posting individually, it's working fine.
    Please send me the code for PO-GR through BAPI.
    Urgently required.
    Regards,
    SImha.

    Is this not working???
    BAPI_GOODSMVT_CREATE to post Goods Movement
    The following is an abap program making used of the BAPI function BAPI_GOODSMVT_CREATE to do Goods Receipts for Purchase Order after importing the data from an external system.
    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
    REgards,
    Ravi

  • Problem while posting FI document through BAPI - Multiple Exchange Rates

    I am able to post FI document with multiple exchange rates for the same currency using FB01. But, when I try to post the same document details using BAPI_ACC_DOCUMENT_POST , it throws an error F5 701 - Inconsistent Rate for Currency XXX .
    How can we avoid this error while posting through BAPI ?
    Thanks & Regards,
    Nidhi

    Hi Nidhi,
    Value range
        The field CURR_TYPE (currency type) describes the role played by a
        currency in the SAP System.
        The currency type can take on the following values, for example:
        o   00      Transaction currency
        o   10      Company code currency
        o   20      Controlling area currency
        o   30      Group currency
        o   40      Hard currency
        o   50      Index-based currency
        o   60      Global company currency
        If an entry is not made in the field CURR_TYPE, the default value "00"
        is retained.
        If only one data record is transferred in transaction currency for each
        line item, the field CURR_TYPE does not need to be filled out. If
        several data records are transferred for each line item, the currency
        type must be entered for each record.
    If the parameter CurrencyAmount is filled with the currency fields,
    a complete document check including characteristics and value
    components of profitability analysis (CO-PA). Otherwise, the account
    assignment objects are checked.
    Check the BAPI documentation SE37.
    Regards,
    Boobalan Suburaj

  • Quantity field KWMENG not updating in Salesorder created through BAPI

    Hi ,
    I created sales order through BAPI - BAPI_SALESORDER_CREATEFROMDAT2.Here, I passed material , quantity , unit of measure etc..
    But, when the sales order is created the value in the quantity filed is missing.
    I passed values as :--
      wa_itemx-updateflag = 'I'.
          wa_item-itm_number = '10'.
          wa_itemx-itm_number = 'X'.
          wa_item-material = wa_alv-matnr.
          wa_itemx-material = 'X'.
          wa_item-rnddlv_qty = wa_alv-kwmeng.
          wa_itemx-rnddlv_qty = 'X'.
          wa_item-target_qu = wa_alv-kmein.
          wa_itemx-target_qu = 'X'.
          wa_itemx-ITEM_CATEG = 'X'.
          append wa_item to it_item.
          append wa_itemx to it_itemx.
    What possibly could be the error?
    Thanks,
    Shivaa......

    Hi,
    You have to pass the quantity in the schedule lines parameter ORDER_SCHEDULES_IN..
    Thanks
    Naren

  • Fields not getting updated in the database through BAPI enhancement

    Hi Experts,
    I have added 4 custom fields in the transaction FB60. The fields are getting displayed in vendor line item.
    I have to fill these fields from an inbound idoc which uses the BAPI_ACC_DOCUMENT_POST bapi. I have implemented the BADI BADI_ACC_DOCUMENT to pass my custom fields to the bapi and it is processing correctly by adding the custom field values to the extension table that is getting passed to the standard program of the BAPI from the BADI.
    But I think, I have missed to append my fields in one of the standard structures. I have added the fields in BSEG, CI_COBL( which is getting called in BAPICOBL_CI, ACCIT).
    Can anybody tell me which other standard structure I should add my custom fields so that it functions properly and gets added to the BSEG table.
    Regards,
    Sangeeta.

    Solved on own.

  • PO number update in COPA document through BAPI_COPAACTUALS_POSTCOSTDATA

    Hi All,
    When i am passing PO number  to Sales order no field in KE21N it is creating COPA doc but when the same PO number is being passed through BAPI_COPAACTUALS_POSTCOSTDATA it is returning error message KE0C 133. As internally the given documents are being checked in VBUK and VBUP table.
    How to pass PO no to SO number field in BAPI_COPAACTUALS_POSTCOSTDATA as my per my requirement ??
    Thanks-
    Pranab

    Pranab da
    Fully agree with you..
    My suggestion would be
    1. Create WWXXX for Purchase Order
    2. Going Forward, Fill PO Number in WWXXX
    3. For the Old docs, you can fill WWXXX with the value in Sales Order Field.. To do this,
    > you need to cancel the COPA doc from KE4S
    > Write a derivation rule to MOVE the KDAUF (Sales Order) into WWXXX
    > Generate COPA doc again
    > Then delete the derivation rule
    Br, Ajay M

  • Transfer the Pur Order Info through BAPI's between SAP R/3 Systems Using XI

    How to Create a Purchase Order for the Vendor and transfer this data through BAPI's between SAP R/3 Systems Using "Exchange Infrastructure(XI)".
    Please kindly let me know the procedure for creating BAPI's and how to transfer this information between SAP R/3 systems. Please kindly mention the NAVIGATION for this scenario.

    Hi Revathi,
    If you want to do an IDOC to IDOC scenario, then the Points to be noted are:
    1. You don’t need a DT, MT or a message interface for the IDOC as it itself acts as the Message Interface.
    2. You import the IDOC and use the same in your mapping.
    3. You do not need a sender IDOC adapter, and no sender agreement, but a receiver IDOC adapter and a receiver agreement is needed.
    IDOC -> File scenario ref:
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    File -> IDOC ->
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    (It concentrates on XSLT mapping but also gives an idea about the configuration part. Do go thru that, it might help you.)
    Apart from this if you need any info on how to configure your ALE, partnet profile,etc  drop me a mail, I have excellent tutors that can help you in the same.
    Regards,
    Bhavesh

  • How to update freight vendor in MIGO

    Hi , I want you to give an idea of how to update freight vendor in freight tab of migo transaction either by bapi-extension or by enhancements or by using badi.... Currently Im Using BAPI_GOODSMVT_CREATE to generate GR....now the freight vendor field is  
    updating with PO-vendor directly......
    Thanks & Regards...
    Edited by: Abhijeet S Shinde on Feb 6, 2012 11:39 AM
    Edited by: Abhijeet S Shinde on Feb 6, 2012 11:41 AM

    I a facing the same issue.. I am creating MIGO using the same BAPI but I am not able to find any relevant field for freight vendor in MIGO Badi..

  • Any way to update PO document through DTW without using "Doc Entry"

    Dear all,
    Just have a question.
    I need to use DTW to update existing PO document. I realized that I have to have Doc Entry to be entered in the DTW template.
    Is there any way to update PO document through DTW without using that field, "Doc Entry"?
    thanks
    Tony

    Tony,
    A similar situation related to Bank files was resolved with one of my clients on the following way...
    The file from the Vendor can be an any order or format on the Excel.  Till the time it is consistant it should work fine..
    We created a Job in SQL Server to read this Excel file and to use the DocNum to get the DocEntry from SAP PO and output another excel file which is exactly the template format for PO Update.
    This may even not be required in your case.....
    You can get this done through an Excel Macro....which will connect to the database and using the DocNum get the DocEntry and update the Excel....
    This is 100% achievable and a better solution for regular use
    Suda

  • Sales Order -- Update the delivery Document Credit status using FM or BAPI

    hi All,
    The requirment is quite urgent......  Actually i am Using a userexit V56FSTAT through VT02N and want to update the credit status through VKM4 Transation. But i require a Function module or Bapi to Update the credit status of the delivery status.
    Please do give me suitable Function module or Bapi through which i can perform the VKM4 transation to update the credit status of delivery document....

    when we go to vkm4 there we click on the reassign button and save then the status is changed in VBUK table....
    so i have to perform this steps through VT02N transation....
    Ny ways thanks for the reply,
    i guess i require more support fom u all
    Message was edited by:
            siddharth samal

  • Item text is not getting updated in Payment document generated through F110

    Hi all,
    After generating the payment document via Transaction Code u2013 F110, system is not updating the Text field in the payment document with the text that we have entered in the Invoice (MIRO or FI Invoice).
    While processing the document via transaction code u2013 F110, in the layout shown for the Invoices to be considered for payment (screen of u201CEdit Proposalu201D), text is not getting updated. When we pressed F1 at the Text field (Which is blank) we came to know that it is a u201CItem Textu201D with u201CTable u2013 REGUEu201D /  u201CField u2013 SGTXTu201D.
    In BSEG (SGTXT field) as well as BSIK (SGTXT field) we are getting the Invoice document with the text maintained in it via MIRO or FI invoice.
    But while processing the invoices through Tcode - F110, in the layout of Edit Proposal (Table - REGUE / Field - SGTXT) we are not getting the u201CText fieldu201D but getting the other data such as Doc. No.( Table - REGUE / Field - BELNR), Fiscal Year (Table - REGUE / Field - GJAHR) etc for processing the proposal which is getting shown in BSEG as well as BSIK.
    In case of manual payment (F-53) we can input the text manually hence that will get updated in payment document but this thing is not possible with F110.
    Can anybody guide me on getting the ItemText (Not Doc. Header text) in FI payment document after F110 execution?
    Regards,
    Shridhar

    Hi Suresh,
    Thanks for the prompt reply. We will be obliged if you guide us in that respect since F110 is a Std. SAP code.
    Have you refer OSS before arriving at the conclusion of developing ABAP program since the Item Text is a std. field of Std. Tcode - F110. Same should had been get updated while making the payment in reference to the Invoice which haves item text in it ?
    Regards
    Shridhar
    FICO

  • Material Master Update through BAPI - Follow up material not updated

    Hi Experts,
    I am updating the material master through a custom transaction using the BAPI  'BAPI_MATERIAL_SAVEDATA'. Rest of the fields are updating correctly except for discontinuation ind., effective out date & follow-up material.
    When I try to update it through MM02 it is working fine. However, when I pass the same data through BAPI it is throwing an error message that 'the material XXXXXX does not exist or is not activated'.
    Please advice.
    Thanks & Regards,
    Ashu Arora

    Some more fields need to be updated along with the discont. indicator. Now working fine.

Maybe you are looking for

  • Concatenating the data from a single field

    hello! I wanted to concatenate all the data in a field field is like this: FIELD1 sample1 sample2 sample3 sample4 Output is like this: sample1, sample2, sample3, sample4 how do i code this? thanks!

  • Time Machine Error - Backup Requires 2,211,365.5 GB!

    Hello - I have searched the posts and nothing seems to touch on this specifically - I have been using Time Machine successfully for months and this has only started to happen in the last few days. I have a white Macbook, 10.5.6 with an upgraded 150GB

  • ITunes PDF info lost in iBooks

    I just upgraded from Mountain Lion to Mavericks. I had been using iTunes extensively for PDFs. I had given all the about 450 PDFs infos like name (title), artist (author), genre, comments and so on and had arranged them into playlists. After installi

  • Adding Scroll Bar in Jlist

    Hello Could anybody suggest me how can I add scroll bar in Jlist. I tried this one, but it did not work JList list = new JList(subject); JScrollPane scrollPane = new JScrollPane(list); Thanks Prashanth

  • Maintenance Order Confirmation in Different units

    Dear all, my client needs to have order confirmation in different units. That is they need to enter how much work is finished in km, piece or m3 . Can i do that with iw41? i know thats time confirmation but from any similar screen? Thanks JMq