BAPI_SALESDATA_CREATEFROMDAT2 Changing Condition Value

Hi,
  when I use  BAPI_SALESDATA_CREATEFROMDAT2  to changeing condition value
  wa_order_conditions_in-itm_number  = '000010'.
  wa_order_conditions_in-COND_ST_NO  = '010'.  
  wa_order_conditions_in-COND_COUNT  = '01'. 
  wa_order_conditions_in-cond_type   = 'PR01'.
  wa_order_conditions_in-applicatio  = 'V'. 
  wa_order_conditions_in-cond_value  = '1900'.
  wa_order_conditions_in-currency    = 'RMB'.
  wa_order_conditions_in-cond_p_unt  = '1'.
  wa_order_conditions_in-cond_unit   = 'PC'.
  wa_order_conditions_inx-itm_number = '000010'.
  wa_order_conditions_inx-COND_ST_NO = '010'.  
  wa_order_conditions_inx-COND_COUNT = '01'.    
  wa_order_conditions_inx-cond_type  = 'PR01'.
  wa_order_conditions_inx-updateflag = 'U'.
  wa_order_conditions_inx-cond_value = 'X'.
  wa_order_conditions_inx-currency   = 'X'.
  wa_order_conditions_inx-cond_p_unt = 'X'.
  wa_order_conditions_inx-cond_unit  = 'x'.
  APPEND wa_order_conditions_inx TO  
         i_order_conditions_inx.
  APPEND wa_order_conditions_in TO
         i_order_conditions_in.
  CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
       EXPORTING
            order_header_in      = wa_order_header_in
            order_header_inx     = wa_order_header_inx
       IMPORTING
            salesdocument        = salesdocument
       TABLES
            order_conditions_in  = i_order_conditions_in
            order_conditions_inx = i_order_conditions_inx.
run it i get a Sales order when i look the item conditions
i found it add a new condition line like :
  PR01 1800.00  RMB ... (automatic price which can
                         be deleted and modifide manual  
                        in 'VA02')
  PR01 1900.00  RMB ... (I expected)
but I only want to get one line
  PR01 1900.00  RMB ...
  now i don't know the reason,
  my version is R/3 3.6C
  wa_order_conditions_in-itm_number = '000010'.
  wa_order_conditions_in-COND_ST_NO = '010'.  
  wa_order_conditions_in-COND_COUNT = '01'. 
'000010','010', '01'
  is found in BAPISDORDER_GETDETAILEDLIST by creat in va01 and look it in BAPISDORDER_GETDETAILEDLIST.

Hi Pan!
The handling of the conditions is quite tricky. Have a look at OSS 593246 for some hints.
Have also a look in some other linked topics:
BAPI_SALESORDER_CHANGE conditions
BAPI_SALESORDER_CHANGE- No Pricing Condition Change
Regards,
Christian

Similar Messages

  • Change condition value in debit memo and credit memo

    Hi Experts,
    When I am trying to create Credit Memo/Debit memo I could able to change the condition value for which condition type the value is there in Sales Order, but where as for other condition types it is not changeable.
    For example for Freight the Condition type is ZFRE,  value is 100 rs in sales order 90000001.
    If I create credit memo with reference to sales order I can able to change freight value from rs100 to rs 75.
    But what to do If I do not maintain freight value initially in sales order and if I want to adjust freight value ZFRE as rs 60 in credit memo. Presently I could not able to enter values in C/D Memo.
    Hope my question is clear to you all.
    Thanks & Regards
    Naresh

    Hi Naresh
    If I understand correctly,  then you want to include the freight amount automatically in the Credit memo which was not featuring in the Credit memo request.
    If it is so, then first see which is Pricing procedure working  for your Credit memo Request.
    In the Pricing Procedure, check the freight condition type (e,g. KF00).
    See the what is Acees sequence assigned to it and in the Access sequence what are table assigned.
    In  condition type KF00,  Access sequence assigned is KF00 and two condition tables "Incoterm" and "Incoterm Part1 + Part2" are assigned to it.
    In the Access sequnce of your Freight condition type , add another/new condition table "350" (Sales organisation). This table is already available in standard system.
    Select the new condition table row, and click on the "Field" in the dialog box till the technical names are opened up / shown inspite of warning.
    Once the technical names of the fields are shown , you can see the green light there, then save it.
    Now, create a condition record (VK11) for your Freight condition (e,g. KF00) by choosing the "Sales organisation" level  from the key combination.
    Then go to the Copy control (VTFA), find the combination "G2 from CR "> go to Item level > select item category G2N and go to details.
    Here, you change the "Pricing type" value to " H " and save it.
    Now, when you will create a Credit memo with reference to the Credit memo request, the  new Freight condition (KF00) will come into effect in the Credit memo, even if ,it was not there in the reference document.

  • BAPI_PO_CHANGE - Change Condition Value

    Hi,
    I want to change the Condition value for a particular Condition type using BAPI_PO_CHANGE.
    I am populating values for following
    Import parameters
    PURCHASEORDER
    POHEADER (Fields PO_NUMBER)
    POHEADERX (Fields PO_PO_NUMBER = X)
    Tables
    POITEM (Fields PO_ITEM, PLANT, STGE_LOC
    POITEMX (Field PO_ITEM, PO_ITEMX = X, PLANT = X, STGE_LOC= X)
    POCOND (Fields COND_TYPE, COND_VALUE, CURRENCY)
    POCONDX (Fields COND_TYPE = X, COND_VALUE = X, CURRENCY = X)
    But PO condition value is not getting changed...
    Regards,
    Balaji Viswanath.

    Hi,
    I got the answer from Naren's earlier post... Given the answer below...
    Hi,
    I believe you can use this BAPI to PO conditions..
    Check this code..
    PARAMETERS: p_ebeln LIKE ekko-ebeln.
    DATA: t_poitem LIKE bapimepoitem OCCURS 0 WITH HEADER LINE.
    DATA: t_poitemx LIKE bapimepoitemx OCCURS 0 WITH HEADER LINE.
    DATA: t_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    DATA: t_cond LIKE bapimepocond OCCURS 0 WITH HEADER LINE.
    DATA: t_condx LIKE bapimepocondx OCCURS 0 WITH HEADER LINE.
    t_poitem-po_item = '00010'.
    t_poitem-net_price = '17.00'.
    APPEND t_poitem.
    t_poitemx-po_item = '00010'.
    t_poitemx-net_price = 'X'.
    t_poitemx-po_itemx = 'X'.
    APPEND t_poitemx.
    t_cond-itm_number = '00010'.
    t_cond-cond_type = 'P000'.
    t_cond-cond_value = '17.00'.
    t_cond-currency = 'USD'.
    t_cond-change_id = 'U'.
    APPEND t_cond.
    t_condx-itm_number = '00010'.
    t_condx-itm_numberx = 'X'.
    t_condx-cond_type = 'X'.
    t_condx-cond_value = 'X'.
    t_condx-currency = 'X'.
    t_cond-change_id = 'X'.
    APPEND t_condx.
    CALL FUNCTION 'BAPI_PO_CHANGE'
    EXPORTING
    purchaseorder = p_ebeln
    TABLES
    return = t_return
    poitem = t_poitem
    poitemx = t_poitemx
    pocond = t_cond
    pocondx = t_condx.
    COMMIT WORK.
    The above code works fine for me...
    Thanks,
    Naren

  • Change condition value in PO after GR

    HI all,
    how can i change the freight condition value  in PO after making  GR for partial quantity.
    we want to change the freight for the next GR.
    thanks

    Hello Laxman,
      The PO can be reversed, change the freight condition and repost it.
      Alternately, the extra amount of freight can be entered as unplanned delivery cost in LIV (MIRO).
    Thanks,
    Venu

  • Userexit at Billing Save to change condition value

    Hi
    My requirment to look for some userexit/enhancement etc. , which will work at the time of billing save (before passing to accounting)  where i can change the condition values (KOMV-KWERT) at item level for particular condition type.
    Regards/Rakesh

    Dear Rakesh,
    Try with these User Exits
    USEREXIT_FILL_VBRK_VBRP (Module pool SAPLV60A, program RV60AFZC)
    This user exit is only called when the billing document is created. It is used to provide the header and the item of the new billing document with deviating or additional data.
    The following user exits are available in report SAPLV60B for transfer to accounting (function group V60B):
    EXIT_SAPLV60B_001: Change the header data in the structure acchd
    You can use this exit to influence the header information of the accounting document. For example, you can change the business transaction, "created on" date and time, the name of the person who created it or the transaction with which the document was created.
    EXIT_SAPLV60B_002: Change the customer line ACCIT
    You can use this exit to change the customer line in the accounting document. This exit is processed once the ACCIT structure is filled in with data from document header VBRK.
    EXIT_SAPLV60B_003: Change the customer line in costing
    The customer line is filled in differently for costing. You can use exit 003 to influence the ACCIT structure.
    EXIT_SAPLV60B_004: Change a GL account item ACCIT You can add information to a GL account item (such as quantity specifications) with this exit.
    EXIT_SAPLV60B_005: User exit for accruals
    Once all relevant data for accruals was entered in the GL account item, you can add to this data with this exit.
    EXIT_SAPLV60B_006: Change the control line ACCIT
    You can use exit 006 to add information to the control line.
    EXIT_SAPLV60B_007: Change the installment plan
    You can use exit 007 to add information to the installment plan
    parameters in the GL account item.
    EXIT_SAPLV60B_008: Change the transfer structure ACCCR, ACCIT and ACCHD
    After the accounting document is filled in with data, you can use exit 008 to change the document once again.
    EXIT_SAPLV60B_010: Item table for customer lines
    You can use exit 10 to influence the contents of customer lines before they are created.
    EXIT_SAPLV60B_0011: Change the parameter for cash account determination or reconciliation account determination
    You can use this exit to change inbound parameters in order to influence account determination.
    I hope this will help you,
    Regards,
    Murali.

  • Changing  Condition values and Condition currency of PO to local currency.

    Dear Friends,
    I have a weird request.
    I have  a PO which has been created in USD. My local currency is INR.
    Normally, when i display the PO, under conditions tab, the condition values and currency will be displayed in USD.
    My requirement is like, i want to change and simulate the condition values in USD to local currency (INR) based on current exchange rate.
    Is there any way i can simulate the same. Kindly help.
    Thanks and Regards
    Sandeep Sivan

    I am not sure that it can be done through the config. You can change the values with the correct user exit and change the values accordingly before the values are displayed.
    Regards,
    FS

  • Multiple Joins between 2 folders - when change condition value

    Hi
    I have created a report that joins 3 tables. The join between 2 of them gave me the option of two possible joins. I selected one and the report runs OK.
    There is a condition in the report that uses one of the fields from one of the tables that has multiple join paths.
    If I change the value of the condition from e.g. field = 04 to field = 05, then I get the error 'multiple join paths between folders'.
    If I disable the multiple join path detection it runs ok and the query matches the original one.
    However, do you know why I would get this error by just changing the value within an existing condition where the join path was already selected?
    Thanks
    GB

    Hi,
    Everytime when you change the value of the column, discoverer re-generates the query and hence asks for the Multiple joins.
    You can disable this option in Discoverer Desktop.
    Go to Tools > Options > Advanced > Uncheck "Multilpe Join Path Detection".
    Cheers!
    Yogini

  • BAPI_PO_CHANGE, changing condition value in the purchase order

    Hi Friends,
    I have a requirement,
    a flat file is present in the application server that contains the information about PO,PO-ITEM,Condition type, movement type , condition value, plant, storage location .
    And i m calling the bapi "BAPI_PO_CHANGE" and passing the po number to it.
    the bapi returns the following tables, i_return, i_header,i_cond, i_item,i_itemx.
    But the purpose of calling the BAPI is, to check, if the condition value in the specified PO is '0', then it has to replace with the value of condition type present in the flat file.
    But when we check the tablei_return, its shows error type.
    And the PO is not updated with the new  condition value.
    Help me out in sorting this problem, by telling me
    what value is to be passed to the respective BAPI and what should i do to solve the issue?
    and after that i m using a BAPI " BAPI_GOODSMOVEMENT_CREATE".
    and it is for the purpose of creating the GR(Goods Receipt),
    when i go through the i_return table of the bapi, it si returning a message that "BAPI_201  Unable to create goods movement".
    Help me in proving the input to those bapi's and how can i get the expected output?
    And let me know, what the bapi's ,"BAPI_COMMIIT" and " BAPI_ROLLBACK" , will be doing?
    Edited by: kumar t on Aug 9, 2008 1:02 PM

    HI
    [Check the Link|http://abap.wikiprog.com/wiki/BAPI_PO_CHANGE]
    [Commit|http://abap.wikiprog.com/wiki/BAPI_TRANSACTION_COMMIT]
    [Roll Back|http://abap.wikiprog.com/wiki/BAPI_TRANSACTION_ROLLBACK]
    Regards
    Pavan

  • Condition value getting changed when open the Sales order in VA02

    Hi Experts,
    i have creating Sales order manually in VA01, and for first line item of sale order, i have assigned value in custom field of additional tab B, to populate Condition value for condition type ZK01 and checked in VA02, VA03 same Condition value is there for condition type ZK01.
    And created delivery document and billing document for newly created Salesorder.
    When i have open the Sales order in VA02, then i am getting changed Condition value for conidition type ZK01 in bothe header and first line item and in VA03 there is no change in value.
    Kindly let me know the user exit or any related programs to this issue.Thanks in Advance.

    Hi Rajani,
    this sound like VOFM -> conditions. Do you know which conditions are active during the determination?
    Cheers,
    Stefan.

  • Condition value of Tax condition type gets added to Total Value in Contract

    Hi All,
    I'm currently investigating an issue where there are 2 line items in an SAP Sales Contract. There is a human error in the second line where the billing end date is less than billing start date in the billing plan.  Consequently, the second line has null Outgoing target value.
    However, the header Total value in the Contract  gets wrongly calculated as Basic condition value of 1st line  + Condition value of tax condition type of line one due to this.   When I modify the billing end date for the second line item to be a date greater than the billing start date, the above problem disappears and the total value of the contract does not include the tax component.
    For eg.
    Normal Error free  Contract
    Total Value at Header =   700.00 EUR
                       Material          Outgoing Target val
    Item 0010    MAT1               450.00                          ( 450 + 50 (tax )  )
    Item 0020    MAT2               150.00   
    Contract with billing plan error in second line
    Total value at Header =   550.00 EUR 
                            MAterial       Outgoing target val          
    Item 0010         MAT1             450.00                    ( 450 + 50 (tax ) )
    Item 0020         MAT2              0.00         
    Any inputs would be most welcome.
    Regards,
    Venkatesh.
    Edited by: Venkatesh Gopalarathnam on Jan 24, 2012 9:48 AM

    No, i didn't.
    Actually, i enter condition type and amount in sales order manually.
    At that time my program which i modified at 'Define And Assign Pricing Procedures' in IMG should be run. 
    But the result of running is different from my purpose.
    To change Condition value of condition type in sales order, are there any solution?

  • 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...

  • Fm to change the condition value in sales order pricing

    Hi Friends,
    I need a FM to change the Pricing value that is auto calculated in the sales order. It needs to be overwritten. BAPI_SALESORDER_CHANGE I don't think will do it. It can be used only to update the condition type and the condition amount but not the condition value.
    Can someone please help me. I've been stuck with this for quite sometime.
    Thanks,
    Dikshitha G

    Try these BAPI's
    BAPI_LISTING_CONDITIONS,
    BAPI_AGREEMENTS
    Regards,
    Rajasekhar Reddy.

  • Changing condition type values in Billing Doc Line Items

    Hi All,
    I want to change the value of condition types JLST and JCST to zero in the line items of proforma invoices. How can I do this?
    Any function module or BAPI? Should I go for BDC?? I tried to find user exits. What can be the optimal way to do this?
    Please help.
    Thanks in Advance
    - Neha.

    Hi Neha,
    You pass 0 (zero) to the field COND_VALUE in CONDITIONSIN table alongwith other relevant data.
    And pass 'X' to the field COND_VALUE in CONDITIONSINX.
    hope it helps.
    saroj

  • Pricing procedure  change the condition value

    Hi,
    My pricing procedure determines the Tax in %basis.Now i have a rewuirement wherein i should be able to enter the amount in AMOUNT COLOUMN in condition tab. This value should be the condition Value for the condition type.
    Now my pricing procedure doesnt allow me to make any changes and the condition type is greyed out. how can i calulate the tax in amount instead of % and be able to enter the value manually?
    Thanks,
    Challa

    Hi Challa,
    Price can be maintained either on percentage basis or on amount basis.
    So you have to make changes in condition type to convert it from percentage to amount.
    Go to IMG u2013 sales and distribution u2013 master data u2013 basic function u2013 pricing u2013 pricing control u2013 define condition type.
    Select maintain condition type from the options.
    Now select your condition type and click on detail.
    Change the calculation type from A (percentage) to B (Fixed amount) and save it.
    Now go to VK11 and maintain the new condition record for that condition type.
    Now create the sales order and go to condition tab and check out the pricing it will be amount.
    Please do this method if you find any difficulty then tell us.
    Regards
    Raj.

  • Problem changing the Condition Value in Po using BAPI_PO_CHANGE

    Hi Experts,
    My issue is BAPI_PO_CHANGE is not changing the Condition value. and giving message in bapi return as 'cannot be processed manually'.
    Can anybody please help me on this.
    Thanks & Regards,
    Sudheer

    Check this link http://forums.sdn.sap.com/thread.jspa?threadID=652278
    Regards,

Maybe you are looking for