BAPI_CUSTOMERQUOTATION_CHANGE

Good afternoon:
I am using BAPI_CUSTOMERQUOTATION_CHANGE for changing my conditions value, i am filling the tables CONDITIONS_IN  and CONDITIONS_INX and in the CONDITIONS_IN  table I am filling the COND_UPDAT = 'U' and in CONDITIONS_INX -UPDATEFLAG = 'X', but i get a repeated register instead of the changed one, can anybody help me please?
Thanks in advance

logic_swith-PRICING = 'C' and mark the conditions like manual

Similar Messages

  • BAPI_CUSTOMERQUOTATION_CHANGE - error while changing a condition value

    Hallo Gurus,
    I am trying to use tshi BAPI BAPI_CUSTOMERQUOTATION_CHANGE to change a condition value of a condition record of a quotation.
    Every time I execute the BAPI, instead of the condition tyoe being changed, a new record is added to the list of conditions!
    Can someone please help!
    Thsi is my piece of code::
    itab_BAPISDH1X-UPDATEFLAG = 'U'.
    append itab_BAPISDH1X.
    itab_BAPICOND-ITM_NUMBER = '10'.
    itab_BAPICOND-COND_ST_NO = '31'.
    itab_BAPICOND-COND_COUNT = '00'.
    itab_BAPICOND-COND_TYPE = 'ZST3'.
    itab_BAPICOND-COND_VALUE = '15.00'.
    itab_BAPICOND-COND_UPDAT = 'X'.
    append itab_BAPICOND.
    itab_BAPICONDX-ITM_NUMBER = '10'.
    itab_BAPICOND-COND_ST_NO = '31'.
    itab_BAPICOND-COND_COUNT = '00'.
    itab_BAPICONDX-COND_TYPE = 'ZST3'.
    itab_BAPICONDX-UPDATEFLAG = 'X'.
    itab_BAPICONDX-COND_VALUE = 'X'.
    append itab_BAPICONDX.
    CALL FUNCTION 'BAPI_CUSTOMERQUOTATION_CHANGE'
      EXPORTING
        salesdocument                = p_vbeln
      QUOTATION_HEADER_IN          =
        quotation_header_inx         = itab_BAPISDH1X
      tables
        return                       = itab_BAPIRET2
       CONDITIONS_IN                =  itab_BAPICOND
       CONDITIONS_INX               =  itab_BAPICONDX
    Thanks!
    Mukta

    Hmm...
    Change the following....and check..
    itab_BAPICONDX-ITM_NUMBER = '10'.
    itab_BAPICOND-COND_ST_NO = '31'.
    itab_BAPICOND-COND_COUNT = '00'.
    itab_BAPICONDX-COND_TYPE = 'ZST3'.
    itab_BAPICONDX-UPDATEFLAG = 'X'.
    itab_BAPICONDX-COND_VALUE = 'X'.
    append itab_BAPICONDX.
    "change the above to.....
    ab_BAPICONDX-COND_TYPE = 'X'.
    append itab_BAPICONDX.
    The BAPICONDX.. should contain only X.. in the fields which you want to update.. try this change..and let us know if it works.
    Also have a look at the FUNCTION MODULE DOCUMENTATION for this bapi in SM37.
    Cheers...

  • Change material using BAPI_CUSTOMERQUOTATION_CHANGE

    hi i want to change meterial from exsisting quotation. i.e. i am replacing lineitems 10 material A to B.
    when i am using manuly ,i mean direct run it is working fine. but when i am using to another bapi it is giving error.. that meterial is not defined for plant 2500"
    but directly it is updating.
    my code is
         I_HEADER1X-UPDATEFLAG = 'U'.
          I_HEADER1-QT_VALID_F = V_ANGDT.
          I_HEADER1-QT_VALID_T = SY-DATUM + 90.
          I_HEADER1X-QT_VALID_F = 'X'.
          I_HEADER1X-QT_VALID_T = 'X'.
          WA_ITEM-ITM_NUMBER = WA_VBAP1-POSNR.
          WA_ITEM-MATERIAL   =  MATERIAL_T.
          APPEND WA_ITEM TO I_ITEM.
          CLEAR WA_ITEM.
          WA_ITEMX-ITM_NUMBER = WA_VBAP1-POSNR.
          WA_ITEMX-UPDATEFLAG = 'U'.
          WA_ITEMX-MATERIAL  = 'X'.
          APPEND WA_ITEMX TO I_ITEMX.
          CLEAR WA_ITEMX.
      I_SWITCH-SCHEDULING = 'X'.
    CALL FUNCTION 'BAPI_CUSTOMERQUOTATION_CHANGE'
      EXPORTING
        SALESDOCUMENT                = V_VBELN
        QUOTATION_HEADER_IN          = I_HEADER1
        QUOTATION_HEADER_INX         = I_HEADER1X
       LOGIC_SWITCH                 =   I_SWITCH
      TABLES
        RETURN                       = RETURN
        QUOTATION_ITEM_IN            = I_ITEM
        QUOTATION_ITEM_INX           = I_ITEMX

    Directly i have try many times it is updating.  i have alrready use without i_switch..Please reply ASAP

  • BAPI_CUSTOMERQUOTATION_CHANGE Contract date change

    Hi,
    Has anybody ever been able to change the contract start date & end date date of a quotation using BAPI_CUSTOMERQUOTATION_CHANGE ?
    I understand I need to pass in the new dates in quotation_header_in with 'U' and 'X' indicators in quotation_header_inx. But I am receiving an error saying field is not editable!!
    Has anybody tried or faced this before. I can use SD_VEDA_UPDATE to get the date change, but I want my condition records and contract dates to change simultaneously using BAPI instead of doing them seprately .
    Thanks,
    Regards,P

    Hi Karin,
    One solution may be to enter the statistical date forcebily thru user exits or BADIS.
    Sreedhar

  • Changing VA22 using 'BAPI_CUSTOMERQUOTATION_CHANGE'

    Hi all,
    I have to change the VA22 transaction using afore said BAPI,
    a quotation is created with a line item using VA21 transaction,so now i have to reject this line item.this line item can be rejected by adding the reason code as 23,thats all the line item will be rejected...This works fine with BDC recording when i try to use BAPI with the below inputs..I get success message in the return table but it is not updated in the quotation...
    Pls suggest me how to reject the line item using BAPI.are the below mentioned inputs sufficient or any inputs need to be added...
    ST_QUOT_HEADER_IN-SALES_ORG  = '1100'.
    ST_QUOT_HEADER_IN-DISTR_CHAN = '10'.
    ST_QUOT_HEADER_IN-DIVISION   = '50'.
    ST_QUOT_HEADER_INX-UPDATEFLAG = 'U'.
    IT_QUOTATION_ITEM_IN-ITM_NUMBER = '10'.
    IT_QUOTATION_ITEM_IN-MATERIAL   = 'Y80885'.
    IT_QUOTATION_ITEM_IN-REASON_REJ = '23'.
    APPEND IT_QUOTATION_ITEM_IN.
    IT_QUOTATION_ITEM_INX-ITM_NUMBER = '10'.
    IT_QUOTATION_ITEM_INX-UPDATEFLAG = 'U'.
    APPEND IT_QUOTATION_ITEM_INX.
    CALL FUNCTION 'BAPI_CUSTOMERQUOTATION_CHANGE'
      EXPORTING
        SALESDOCUMENT                = '0020434795'
        QUOTATION_HEADER_IN          = ST_QUOT_HEADER_IN
        QUOTATION_HEADER_INX         = ST_QUOT_HEADER_INX
      TABLES
        RETURN                       = IT_RETURN
       QUOTATION_ITEM_IN             = IT_QUOTATION_ITEM_IN
       QUOTATION_ITEM_INX            = IT_QUOTATION_ITEM_INX
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .
    Thanks in advance
    regards
    balaji

    Directly i have try many times it is updating.  i have alrready use without i_switch..Please reply ASAP

  • BAPI_CUSTOMERQUOTATION_CHANGE for changing VC info

    Hello ABAPers:
    I am using BAPI_CUSTOMERQUOTATION_CHANGE for changing Variant Configuration information on quotes. I am filling the table quotation_item_inx with quotation_item_inx-UPDATEFLAG = 'U'  quotation_item_inx-CONFIG_ID = 'X' and other VC tables QUOTATION_CFGS_REF, QUOTATION_CFGS_INST, and QUOTATION_CFGS_VALUE. It updates other header and item fields except the config info. Has anybody tried updating Variant Configuration info on quotes?
    Thanks for your time.

    Hello Andrew,
    Yes I am filling in quotation_item_in table with the following info.
      sd_item_it-itm_number = '000030'.
      sd_item_it-hg_lv_item = '000000'.
      sd_item_it-material=  '10435-5562'.
      sd_item_it-alt_to_itm = '000000'.
      sd_item_it-dlv_group  = '000'.
      sd_item_it-target_qty = '1'.
      sd_item_it-target_qu = 'EA'.
      sd_item_it-t_unit_iso = 'EA'.
      sd_item_it-po_itm_no  = '000030'.
      sd_item_it-PMNTTRMS = 'NT45'.
      sd_item_it-CONFIG_ID = '000001'.
    sd_item_it-inst_id = '00000001'.
      append sd_item_IT.
    quotation_item_inx is filled with
      sd_item_x_it-itm_number = '000030'.
      sd_item_x_it-updateflag = 'U'.
      sd_item_x_it-PMNTTRMS = 'X'.
      APPEND sd_item_x_it.
    QUOTATION_CFGS_REF is filled with
      q_cfgs_ref-posex = '000030'.
      q_cfgs_ref-config_id = '000001'.
      q_cfgs_ref-root_id = '00000001'.
      q_cfgs_ref-complete = 'T'.
      q_cfgs_ref-consistent = 'T'.
      append q_cfgs_ref.
    QUOTATION_CFGS_INST is filled with
      q_cfgs_inst-config_id = '000001'.
      q_cfgs_inst-inst_id   = '00000001'.
      q_cfgs_inst-obj_type = 'MARA'.
      q_cfgs_inst-class_type = '300'.
      q_cfgs_inst-OBJ_KEY = '10435-5562'.
      q_cfgs_inst-quantity = '1'.
      q_cfgs_inst-quantity_unit = 'EA'.
      q_cfgs_inst-complete = 'T'.
      q_cfgs_inst-consistent = 'T'.
      append q_cfgs_inst.
    QUOTATION_CFGS_VALUE is filled with
      q_cfgs_value-config_id = '000001'.
      q_cfgs_value-inst_id   = '00000001'.
      q_cfgs_value-charc   = 'ART_REFERENCE'.
      q_cfgs_value-charc_txt   = 'Art Reference'.
      q_cfgs_value-value   = 'B'.
      append q_cfgs_value.
    As you can see config_id id matching. I am filling in the quote number in salesdocument and the update_flag in quotation_header_inx is set to 'U'.
    In the above situation, I am able Payment terms on the item but not config info.

  • Dump when calling BAPI_CUSTOMERQUOTATION_CHANGE ?

    Hi gurus,
    My code is below :
    wt_quotation_itemx-updateflag = 'D'.
        APPEND wt_quotation_itemx.
        ws_quotation_inx-updateflag = 'M'.
        CALL FUNCTION 'BAPI_CUSTOMERQUOTATION_CHANGE'
          EXPORTING
            SALESDOCUMENT                = is_header-vbeln
           QUOTATION_HEADER_IN          = ws_quotation_in
            QUOTATION_HEADER_INX         = ws_quotation_inx
          SIMULATION                   =
          BEHAVE_WHEN_ERROR            =
          INT_NUMBER_ASSIGNMENT        =
          LOGIC_SWITCH                 =
          NO_STATUS_BUF_INIT           = ' '
          TABLES
            RETURN                       = ot_return
           QUOTATION_ITEM_IN            = wt_quotation_item
           QUOTATION_ITEM_INX           = wt_quotation_itemx
    But when i run , I gave me a dump like this :
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
    not caught in
    procedure "Z_BAPI_OFFRE_CHANGEFROMDATA" "(FUNCTION)", nor was it propagated by
    a RAISING clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    The call to the function module "BAPI_CUSTOMERQUOTATION_CHANGE" is incorrect:
    In the function module interface, you can specify only
    fields of a specific type and length under "QUOTATION_HEADER_INX".
    Although the currently specified field
    "WS_QUOTATION_INX" is the correct type, its length is incorrect.
    I've tried much but I get the same error , here I want to delete all items of the quotation  .
    Points rewarded immediately .
    Thanks,

    Hello all.  Thank you for your support with this issue.
    The issue has been resolved. I found that applying OSS Note 1402008 prevented the dump.  The issue was with the FM itself, and not with SE37.
    I hope that this helps others in the future.
    Thanks again!

  • Delete sales employee in header level with BAPI_CUSTOMERQUOTATION_CHANGE

    hi  experts,
    I try to delete sales employee in header level, but i always get the error message:
    FB call: insufficient parameters
    The sales document is not yet complete: Edit data
    Sales document 0007002015 was not changed
    Please give a light  how to delete sales employee successfully . Thank you very much!!
    My program:
    REPORT z_test_change_partner .
    DATA:
          order_header_inx LIKE bapisdh1x,
          order_header_in LIKE bapisdh1,
          return LIKE bapiret2 OCCURS 0 WITH HEADER LINE,
          quotation_item_inx LIKE bapisditmx OCCURS 0 WITH HEADER LINE,
          partners LIKE bapiparnr OCCURS 0 WITH HEADER LINE,
          partnerchanges LIKE bapiparnrc OCCURS 0 WITH HEADER LINE
    order_header_inx-updateflag = 'U'.
    quotation_item_inx-updateflag = 'U'.
    quotation_item_inx-itm_number = '000010'.
    APPEND quotation_item_inx.
    CLEAR partners.
    partners-partn_role = 'VE'.
    partners-partn_numb = '00001000'.
    APPEND partners.
    CLEAR partnerchanges.
    partnerchanges-document = '0007002015'.
    partnerchanges-itm_number = '000000'.
    partnerchanges-updateflag = 'D'.
    partnerchanges-partn_role = 'VE'.
    *partnerchanges-p_numb_old = '00001111'.
    *partnerchanges-p_numb_new = '00001000'.
    APPEND partnerchanges.
    CALL FUNCTION 'BAPI_CUSTOMERQUOTATION_CHANGE'
      EXPORTING
        salesdocument                = '0007002015'
       quotation_header_in          = order_header_in
        quotation_header_inx         = order_header_inx
      SIMULATION                   =
      BEHAVE_WHEN_ERROR            =
      INT_NUMBER_ASSIGNMENT        =
      LOGIC_SWITCH                 =
      NO_STATUS_BUF_INIT           = ' '
      TABLES
        return                       = return
      QUOTATION_ITEM_IN            =
       quotation_item_inx           = quotation_item_inx
       partners                     = partners
       partnerchanges               = partnerchanges
      PARTNERADDRESSES             =
      CONDITIONS_IN                =
      CONDITIONS_INX               =
      QUOTATION_CFGS_REF           =
      QUOTATION_CFGS_INST          =
      QUOTATION_CFGS_PART_OF       =
      QUOTATION_CFGS_VALUE         =
      QUOTATION_CFGS_BLOB          =
      QUOTATION_CFGS_VK            =
      QUOTATION_CFGS_REFINST       =
      SCHEDULE_LINES               =
      SCHEDULE_LINESX              =
      QUOTATION_TEXT               =
      QUOTATION_KEYS               =
      EXTENSIONIN                  =
    LOOP AT return.
      WRITE / return-message.
    ENDLOOP.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       wait          = 'X'
    IMPORTING
      RETURN        =

    Hi Edith,
    Thank you very much for your reply.
    I changed my program by following your steps in the reply. Now the BAPI is showing error messages: "Instance 7200000060 of object type PurchaseOrder could not be changed" and "Price without service not allowed".
    Please refer my code below.
    poitem-po_item = '0010'.
    poitem-pckg_no = '0000001964'.
    poitem-item_cat = '9'.
    APPEND poitem.
    poitemx-po_item = '10'.
    poitemx-po_itemx = 'X'.
    poitemx-pckg_no = 'X'.
    poitemx-item_cat = 'X'.
    APPEND poitemx.
    Parent line
    poservices-pckg_no = '0000001964'.
    poservices-line_no = '0000000001'.
    poservices-ext_line = '0000000000'.
    poservices-subpckg_no = '0000001965'.
    poservices-matl_group = '01040107'.
    *poservices-delete_ind = 'X'.
    *poservices-quantity = ' '.
    *poservices-base_uom = ' '.
    *poservices-gr_price = ' '.
    APPEND poservices.
    CLEAR: poservices.
    Child line.
    poservices-pckg_no = '0000001965'.
    poservices-line_no = '0000000002'.
    poservices-ext_line = '0000000010'.
    poservices-quantity = '1'.
    poservices-service = '000000000005000010'.
    poservices-base_uom = 'EA'.
    poservices-gr_price = '150'.
    poservices-subpckg_no = '0000000000'.
    poservices-matl_group = '01040107'.
    poservices-delete_ind = 'X'.
    APPEND poservices.
    CALL FUNCTION 'BAPI_PO_CHANGE'
      EXPORTING
        purchaseorder = '7200000060'
      TABLES
        return        = return[]
        poitem        = poitem[]
        poitemx       = poitemx[]
        poservices    = poservices[]
        posrvaccessvalues = posrvaccessvalues[].
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    Regards,
    Revanth

  • Deleting quotation items with BAPI_CUSTOMERQUOTATION_CHANGE

    hi everybody,
    i try to delete single line items/positions in quotations by calling BAPI_CUSTOMERQUOTATION_CHANGE. The return table is always filled with success-messages but somehow when looking at the transaction VA23 the line items are still present although a BAPI_TRANSACTION_COMMIT has also been executed in my souce code. Please advise...Thanks...

    In your internal table related to type QUOTATION_ITEM_INX, are you setting the UPDATEFLAG value to 'D' ?

  • Clear buffers before calling BAPI 'BAPI_CUSTOMERQUOTATION_CHANGE'

    When i am calling BAPI_CUSTOMERQUOTATION_CHANGE in a program in which table buffers are used then it is giving me error  'Enter the document number'. But when the same BAPI with same data is run in a test program it runs successfully. I think some of the buffers are not cleared which are giving problem in BAPI. is there any FM to clear all buffers before calling a BAPI.

    Write/Enter  the Transaction
    /$sync
    it will reset the Buffers.
    Kanagaraja L

  • Create pricing condition using BAPI_CUSTOMERQUOTATION_CHANGE

    Hi ,
    I have a requirement to update  quotation pricing data is condition exists i.e if pricing is already exists , if pricing is not exists it has to create a new pricing condition with the given information .
    I am able to update the information using  BAPI_CUSTOMERQUOTATION_CHANGE if pricing condition exists ,if pricing condition  not existing its not working as expected.
    Please guide me..
    code i have written
    *Conditions
          lt_conditions_in-itm_number = it_quot-posnr.
          lt_conditions_in-cond_type = c_zill.
          lt_conditions_in-cond_value = it_quot-kbetr.
          lt_conditions_inx-cond_count = 1.
          APPEND lt_conditions_in.
          lt_conditions_inx-itm_number = it_quot-posnr.
          lt_conditions_inx-cond_type = c_zill.
          lt_conditions_inx-updateflag = c_u.
          lt_conditions_inx-cond_value = c_x.
          APPEND lt_conditions_inx.
    Thanks in advance,
    Srinivas.

    Hello Srinivas,
    Use BAPI_QUOTATION_CREATEFROMDATA in the create scenario. Before calling the BAPI check if the quotation exists. If yes, use BAPI_CUSTOMERQUOTATION_CHANGE.
    Regards,
    Ajith

  • Updating Sales Quantity in BAPI_CUSTOMERQUOTATION_CHANGE

    We are trying to change the Sales Unit and Quantity using the Quotation Quotation. 
    So far we have only been successful in changing the Sales Unit and the Sales Quantity is eluding us. 
    We are using BAPI_CUSTOMERQUOTATION_CHANGE
    and also BAPI_QUOTATION_CREATEFROMDATA2 and neither one is working. 
    If anyone has any suggestions it would be greatly appreciated.
    The following is the test we have put together:   The Sales order is already existing and has two line items:
        vbeln = '1000000074'.
        clear: quote_hdr_in.
        quote_hdr_in-sales_org  = zpr3_constants=>sales_org.
        quote_hdr_in-distr_chan = zpr3_constants=>dist_channel.
        quote_hdr_in-division   = zpr3_constants=>division.
        quote_hdr_inx-updateflag = zpr3_constants=>action_update.
    Build subquote lines
        data: lt_orig_vbap   type table of vbap.
        data: ls_orig_vbap   type vbap.
        select * from vbap
           into table lt_orig_vbap
           where vbeln = vbeln.
    Item data
        read table lt_orig_vbap into ls_orig_vbap
             with key posnr = 10.
        if ls_orig_vbap-zieme = 'CWT'.
          exp_zieme  = 'TON'.
          exp_qty    = 1.
        else.
          exp_zieme  = 'CWT'.
          exp_qty    = 1900.
        endif.
        do 2 times.
          clear: item_in.
          clear item_inx.
          if syst-index = 1.
            item_in-itm_number = 10.
          else.
            item_in-itm_number = 20.
          endif.
          item_inx-itm_number = item_in-itm_number.
          item_inx-updateflag = zpr3_constants=>action_update.
          item_in-sales_unit  = exp_zieme.
          item_inx-sales_unit = abap_true.
          item_in-material    = 'C00001'.
          item_inx-material   = abap_true.
          item_in-target_qty  = exp_qty.
          item_in-target_qu   = exp_zieme.
          item_inx-target_qty = abap_true.
          item_inx-target_qu  = abap_true.
          append item_in to items_in.
          append item_inx to items_inx.
        enddo.
        call function 'BAPI_CUSTOMERQUOTATION_CHANGE'
          exporting
            salesdocument            = vbeln
            quotation_header_in      = quote_hdr_in
            quotation_header_inx     = quote_hdr_inx
          tables
            return                   = returns
            quotation_item_in        = items_in
            quotation_item_inx       = items_inx
            partners                 = partners.
        call function 'BAPI_TRANSACTION_COMMIT'
          exporting
            wait = 'X'.
    The end result is that the Sales Quantity and Unit should toggle back and forth and it is not.... only the Unit is changing.
    Glenn

    That was a long time ago..... I believe we used BAPI_SALESORDER_CHANGE to change an existing quotation.  At least that is what I have found in some documentation .
    I hope that helps. 
    Glenn

  • Sales order with reference to sales order

    Hi,
       I need to create a sales order with reference another sales order using bapi CreateFromDat2.  Please note, Sales Ord. Dist. channel, Div, sold-to to of the new order are different from original order.   I gave reference order in field order_header_in-REFDOCTYPE .  I am getting following error when I perform single test " FB Call: insufficient parameters.  Can any of you tell me how to overcome this issue.  And is it possible to create an order refering to another Saler order with different Sales Ord, Dist. channel, Division, sold-to ?
    <b><REMOVED BY MODERATOR></b>
    Cheers
    Sudhaker
    Message was edited by:
            Alvaro Tejada Galindo

    There is an OSS note <a href="https://service.sap.com/sap/support/notes/370988">Note 370988 - BAPIs in SD: Creation with reference</a>
    <i><b>Symptom</b>
    This note describes the problems of the 'Create with reference' function when using BAPIs to create sales documents.
    If you are working online, you can use this function module to create a sales document with reference to an existing sales document or a billing document (for example, a debit or credit memo request) according to fixed rules. The rules for transferring information from the source document to the target document are defined in the copying control on header and item level. The creation with reference permits an item selection.
    When you use BAPIs in SD, a function of this type is not fully available. A reference is only possible for a quantity contract, so that the target quantity of the contract can be reduced by the order quantity of the sales document. Furthermore, the document flow is also updated.
    As an alternative to 'Create with reference' in Transaction VA01, two variants are provided for solving the 'Create with reference' problem in the BAPI.
          1. Create a '1:1 ' - that is, a document copy of a sales document (customer quotation, order) with 'BAPI_SALESDOCUMENT_COPY'. At this point, you cannot create the 1:1 copy of either a billing document or a delivery.
          2. Create a sales document that refers to an existing document with 'BAPISDORDER_GETDETAILEDLIST' and 'BAPI_SALESORDER_CREATEFROMDAT2'.
    <b>Other terms</b>
    BAPI_SALESDOCUMENT_COPY, BAPI_SALESORDER_CHANGE, BAPI_CUSTOMERINQUIRY_CHANGE, BAPI_CUSTOMERQUOTATION_CHANGE, BAPI_SALESORDER_CREATEFROMDAT1, BAPI_SALESORDER_CREATEFROMDAT2, BAPI_SALESORDER_CREATEFROMDATA, BAPISDORDER_GETDETAILEDLIST
    <b>Reason and Prerequisites</b>
    As of yet, no method exists for creating a sales document that refers to an existing document.
    Solution
    For solution No. 1
          1. Create the documents using the BAPI_SALESDOCUMENT_COPY function module. However, this only permits a 1:1 copy without factoring out individual items.
          2. After you have created the document copy, you can use a change BAPI to edit this copy.
    For solution No. 2
          1. Collect the data for the reference document (for example a customer quotation) with the 'BAPISDORDER_GETDETAILEDLIST' function module. In the example code, focus exclusively on the partners, items, schedule lines and conditions.
          2. Prepare the Data. Execute the 'copying control' manually. This way, you decide which values are to be transferred.
          3. Create the sales document using the 'BAPI_SALESORDER_CREATEFROMDAT2' function module by transferring the prepared data.
          4. Finally, you must remove a COMMIT WORK so that the sales document can be written into the database.
    An example of solution 2 is attached as a text file. You are allowed to select items and quantities for example, if you use input parameters. If there are no entries, then transfer 1:1 from the reference document. When you enter the 'condition type' parameter, you can determine whether conditions are copied or recalculated ('G' for transferring from the preceding document; 'B' or ' ' for re-determining, and 'C' for re-determining with transfer of the manual elements).</i>
    Sample : <a href="https://websmp108.sap-ag.de/~sapidb/012003146900000486112004E/BAPI_COPY_WITH_REF.txt">ZZ_MS_BAPI_COPY</a>
    Regards

  • Rewrite  process and remove the call to f-54 and replace with bapi proces

    Hi Gurus,
    Please help me to find the soultion.
    The root cause of this continual problem is the design and use of BDC session for F-54.  Is there a redesign possible with ECC6.0?
    I wanted to rewrite the process and remove the call to f-54 and replace with bapi process.
    if this is now possible in ECC 6.0
    The benefit would be to better control what PO was used in the DP recoupment.
    Thanking you,
    Raju Singhireddy.

    Hi Balaji,
    Check this BAPI
    BAPI_QUOTATION_CREATEFROMDATA
    BAPI_QUOTATION_CREATEFROMDATA2
    BAPI_CUSTOMERQUOTATION_CHANGE
    Regards
    Arun

  • BAPI to Change MM Vendor Quotation (Simulate ME47)

    Hi everybody.
    I'm abap consultant and I'm trying to find a BAPI to change a Vendor Quotation.
    I've found two so far, but they are especific to Customer or Purchase Order (BAPI_CUSTOMERQUOTATION_CHANGE and bapi_po_change).
    I've seen that currently there isn't no BAPI for Vendor Quotation, but I can't belive it's true.
    Please anybody has any suggestion?
    Best regards

    Hello Vinicius,
    There is currently no BAPI for Transaction ME47 for RFQ and vendor quotation in the standard SAP system design.
    Please review Note 197958 BAPIs for purchase orders - Missing functionality
    In BAPI_PO_CREATE and BAPI_PO_CREATE1 the field bstyp is filled by program with 'F' (purchase order).
    Regards
    Amber

Maybe you are looking for