Condition Rates(KBETR) from Subtotals KZWI2/KZWI6

Hello All
Base : I am implementing Condition Value Formula Routines in VOFM in order to Price Material.
    In a Pricing Procedure, they are two step numbers defined that displays the Subtotals( one with field 2 and other with 6).
     In a dummy condition type, I want to copy the subTotals and Condition Rates.
     For this dummy condition Type, I have implemented the CalType rountine and able to get the Subtotal as follows :
     xkwert      = komp-kzwi6.  (for first dummy condition type)
     xkwert      = komp-kzwi2.  (for 2nd dummy condition type)
     But I do not know how to find the Condition Rates associated separately for these subtotals and save it into the dummy conditions types.(both Condition Rates and Subtotal).
   Please guide to achive this !
Cheers
RJ

Found myself!

Similar Messages

  • IPC: How to read the Condition Rate(KBETR) in Java checkRequirement method.

    Hi Experts,
    As part of an IPC development, we need to read the Condition Type Rate (KBETR) in a Requirement Formula. The condition rate is the rate for the current record of the pricing procedure, e.g. Condition Type ZAB1.
    I can successfully read the condition rate in a Value formula using this piece of code:
    public BigDecimal overwriteConditionValue(IPricingItemUserExit pricingItem,IPricingConditionUserExit pricingCondition) {
                      BigDecimal ZConditionRate = pricingCondition.getConditionRate().getValue();
    In a Value Formula "IPricingConditionUserExit pricingCondition" is a input parameter of the overwriteConditionValue() method. However in a Requirement formula the standard method checkRequirement(IConditionFindingManagerUserExit item, IStep step, IAccess access) does not have any parameter which can give me the rate.
    I wrote the following logic in the requirement class, but line 2 is not executed.
    1. public boolean checkRequirement(IConditionFindingManagerUserExit item, IStep step, IAccess access) {
         2.  IPricingConditionUserExit pricingHeader = (IPricingConditionUserExit) item;
         3.  BigDecimal ZConditionRate = pricingHeader.getConditionRate().getValue();
    Please suggest how we can retrieve the condition rate in a requirement formula class using teh standard methods & classes.

    Hi,
    I have to set the condition rate as percentage in one of my codition value formula routine which i am developing based on java.
    I have overwritten  the method overwriteConditionValue() in my pricing routine which is 927. My logic is below.
    When I open my quotation using crmd_order, condition rate is not being displayed with % for unit condition rate coulmn in my pricing conditions.
    If I try to change my quotation for ex: Agrred price: xworke, then 927 formula is called and condition rate is displayed as %.
    So condition rate value is displayed perfectly , but when my quotation is in display mode condition rate value is coming as USA, but it should be % irrespective of my quotation is in display mode or change mode. I have attached the two screen shots for quotation display mode and change mode.
    Can some body throw insight what is wrong in my pricing routine logic in setting % condition rate rather than USD for the Condition rate value.
    public BigDecimal overwriteConditionValue(IPricingItemUserExit pricingItem,
      IPricingConditionUserExit pricingCondition) {
      BigDecimal condValue = null;
      BigDecimal discountValue = null;
      try{ 
        BigDecimal xworkg = pricingItem.getSubtotal(PricingCustomizingConstants.ConditionSubtotal.SUBTOTAL_G).getValue();
        userexitlogger.writeLogDebug(" 927 formula, Date=["+new Date()+"] , xworkg=["+xworkg+"]");
        BigDecimal xworke = pricingItem.getSubtotal(PricingCustomizingConstants.ConditionSubtotal.SUBTOTAL_E).getValue();
        userexitlogger.writeLogDebug(" 927 formula, Date=["+new Date()+"],  xworke=["+xworke+"]");
        pricingCondition.setCalculationType(PricingCustomizingConstants.CalculationType.PERCENTAGE); 
        if (xworkg.compareTo(PricingTransactiondataConstants.ZERO) != 0) {   
        condValue =  xworkg.subtract(xworke);
        pricingCondition.setConditionValue(condValue); 
        // Calculate percentage with 3-decimal-precision (as does ABAP-Version by multiplying with 100.000 instead of 100)
        pricingCondition.setConditionRate(condValue.multiply(PricingTransactiondataConstants.HUNDRED).divide(xworkg,
          3, BigDecimal.ROUND_HALF_UP), "%");
        pricingCondition.setPricingUnit(new BigDecimal(0), null);
        else {
        pricingCondition.setConditionRate(PricingTransactiondataConstants.ZERO, "%");
        pricingCondition.setPricingUnit(new BigDecimal(0), null);
      catch (Exception ex) {
        //pricingCondition.setInactive(PricingCustomizingConstants.InactiveFlag.INACTIVE_DUE_TO_ERROR);
        userexitlogger.writeLogError("Error Occured in 927 formula, reason code=["+ex.getMessage()+"]");
        return null;
      //return condValue;
      return null;
    Thanks
    Srikar

  • Condition rate/Amount (KONV- KBETR) is showing wrongly for Japanse currency

    Dear Friends,
    The Table data for the Condition rate/Amount (KONV- KBETR) is showing wrongly for Japanse currency(JPY).For ex-The invoice is showing correctly as 3 JPY but the Invoice output shows 300 JPY.This data being fetched from the KBETR shows 300JPY instead of 3JPY.Pl help to resolve this.
    Thanks
    Isaac

    Dear Isaac,
    This may due to condition record maintainenance for that condition type in the VK11 transaction so please go to VK12 transaction check the condition value for that condition type.
    KBETR -- Means Rate (condition amount or percentage) where no scale exists, it exists in KONP table(Condition record table).
    Also Check anybody change the values in the sales order or in invoice from 300 to 3.
    I hope this will help you,
    Regards,
    Murali.

  • FM to change condition rate (konp-kbetr)

    Hi ALL,
    I need to change the condition rate field (KONP-KBETR) . I am using FM SD_CHANGE_COND_REC_NUMBER and MAP2I_BAPICONDIT_TO_KONP
    but unable to get the expected output.
    Kindly advice on the solution.
    Regards,
    Bharat.

    Moved to ABAP Forum.
    Regards,
    RIch Heilman

  • BADI for updating condition rate in CRMD_ORDER

    Hi Gurus,
    I am creating a sales order using CRMD_ORDER and trying to update the condition rate in ABAP. I need to know how exactly i can do the same.
    I have identified CRM_COND_COM_BADI and CRM_PRICING_I_BADI but I don't know which parameters to alter in order to update the condition rate.
    Regards.

    Hi Charles,
    Here is a piece of code which i used to update pricing conditions.
    From here you can see what all fields are to be passed to maintain price conditions.
                          y_lwa_pric_cond_change-stunr = y_lwa_pric_cond-stunr.
                          y_lwa_pric_cond_change-zaehk = y_lwa_pric_cond-zaehk.
                          y_lwa_pric_cond_change-waers = y_lwa_pric_cond-waers.
                          y_lwa_pric_cond_change-kbetr = y_lwa_pridoc-ypriccndp.
                          INSERT y_lwa_pric_cond_change INTO TABLE y_li_pric_cond_change.
                    y_lwa_pridoc-cond_change = y_li_pric_cond_change.
                    INSERT y_lwa_pridoc INTO TABLE p_it_pridoc.
                    y_lwa_input_fields-ref_guid = y_lwa_pridoc-ref_guid.
                    y_lwa_input_fields-ref_kind = 'B'.
                    y_lwa_input_fields-objectname = 'PRIDOC_COM'.
                    y_lwa_field_names-fieldname = 'LIST_PRICE'.
                    INSERT y_lwa_field_names INTO TABLE y_li_field_names.
                    y_lwa_field_names-fieldname = 'DISCOUNT'.
                    INSERT y_lwa_field_names INTO TABLE y_li_field_names.
                    y_lwa_field_names-fieldname = 'NET_PRICE'.
                    INSERT y_lwa_field_names INTO TABLE y_li_field_names.
                    y_lwa_input_fields-field_names = y_li_field_names.
                    INSERT y_lwa_input_fields INTO TABLE y_ct_input_fields.
                    REFRESH y_li_field_names.
                    CALL FUNCTION 'CRM_ORDER_MAINTAIN'
                      EXPORTING
                        it_pridoc       = p_it_pridoc
                      CHANGING
                        ct_orderadm_i   = p_it_orderadm_i
                        ct_input_fields = y_ct_input_fields.
    Let me know if you need any clarrification.
    Regards,
    Vinay Sah
    Edited by: Vinay Sah on May 26, 2009 11:17 AM

  • Updating Condition Rate in SO using BAPI 'BAPI_SALESORDER_CHANGE'

    Hi,
    I want to update the price related to condtions(both automatic and manual) in Sales Order items from input file. I am using bapi 'BAPI_SALESORDER_CHANGE' to for this.
    I used follwing code,
    wa_so_cond-itm_number = wa_input-so_item.
    wa_so_cond-cond_type  = wa_input-kschl.
    wa_so_cond-cond_st_no = '011'.
    wa_so_cond-cond_count = '00'.
    wa_so_cond-cond_value = wa_input-kbetr.
    APPEND wa_so_cond TO i_so_cond.
    CLEAR wa_so_cond.
    wa_so_condx-itm_number = wa_input-so_item.
    wa_so_condx-cond_type  = wa_input-kschl.
    wa_so_condx-cond_st_no = '011'.
    wa_so_condx-cond_count = '00'.
    wa_so_condx-updateflag = c_u.
    wa_so_condx-cond_value = c_x.
    APPEND  wa_so_condx TO i_so_condx.
    CLEAR wa_so_condx.
    But this is creating a new line in conditions instead of updating the existing line, even though the existing line is a inactive by crerating a new line I want to update the exsting line with new condition rate instead of creating a new line. Please help me if you have any soultion for this.
    Thanks in Advance,
    Prasad JVV.

    Hi Sandipan,
    I used APPEND to fill the conditions_in & conditions_inx, without filling the tables how can I modify?
    Thanks,
    Prasad JVV.

  • When line item materials are same add the condition rate.

    HI!
    Im my smartform I am trying to get the unit price for the line items. There are are certain scenerions where my code faisl because the billing doc is prepared with multiple sales order which has several materials eneterd twice or thrice . SO as per my code the net value is getting added up for the identical materials but the condition rate is not adding up so when I do teh calculation to get the unit price it gives me wrong values. Like if theer are 3 materials in the billing doc with net price as 5000 each with eachs condition value for the tax is 500  then my code calucltes teh total for 3 items (identical ) as 150000 which is right but I have to substeract the condition value from this as teh condtion value is a tax and that is alreday included in teh net price so   we substarct, hence in this case it should do 15000 - 3*500 but unfortunately it does only 15000 - 500 , I beleive it takes the condition rate only for the last item found and substract that but i need to include all teh three items value so I get correct unit price.
    Following is teh code I used. I need to add functionality such that the gs_it_kond_w-kwert  gets added up each time the material number is same. so that i get the correct unit price.
    loop at  is_bil_invoice-it_kond into gs_it_kond_w where
          bil_number = wa_it_gen-bil_number and
          itm_number = wa_it_gen-itm_number .
        if gs_it_kond_w-kntyp = 'D'.
          gs_unit_price = ( gs_it_cont-netwr - gs_it_kond_w-kwert ) / gs_it_cont-fkimg.
          gs_it_cont-netwr = gs_unit_price * gs_it_cont-fkimg.
          is_bil_invoice-hd_gen-bil_netwr =  is_bil_invoice-hd_gen-bil_netwr  -  gs_it_kond_w-kwert .
        else.
          gs_unit_price = gs_it_cont-netwr / gs_it_cont-fkimg.
          is_bil_invoice-hd_gen-bil_netwr = is_bil_invoice-hd_gen-bil_netwr.
        endif.
      endloop.
      endif.
    Thanks

    Hi Aarav,
    I am not sure how your code behaves but, you can try following ways:
    1.  To ensure that if material for different line item is same, you can put a join on KONV, VBAK and VBAP as KONV-KNUMV = VBAK-KNUMV and VBAK-VBELN = VBAP-VBELN and KONV-KPOSN = VBAP-POSNR. After this, you can loop through the data extracted, sort it with material number and check for repeated materials and from KONV, you can get condition value and condition type etc.
    2.  To ensure that you are considering tax deductions each time a certain material is repeating, you can calculate net value at each material using its calculation type (KONV-KRECH) (percentage or fixed value) and condition value (KONV-KBETR or KONV-KWERT) without checking whether it is repeated or not. So, in the end, you will have exact net value and you will not miss any deduction.
    Let me know if this helps and also, for any clarifications.
    Gouri.

  • UK VAT - MWST Condition Rate in Sales Order different to Billing Document

    We are testing the UK VAT Rate Change.
    Condition MWST has a rate of 15% until today and 17.5% from tomorrow.
    When I create a sales order with a requested delivery date of tomorrow and a pricing date of today the MWST Condition is shown as 17.5% at both header and lin eitem.
    If I create a delivery, post goods issue and create a billing document today, the billing document correctly shows the MWST Condition rate as 15%%.
    But the Sales document still displays the MWST Condition rate as 17.5% .
    ?? How can I get the sales document to display the actual condition rate ??
    I cannot find a solution to this anywhere and would be grateful for any help.
    Regards,

    Hi Michael,
    If the pricing date for the Sales Order and the Billing Document are the same, the VAT should be also be the same.
    But the pricing date for both document does not always have to be the same.
    If the real goods issue date is different from the planned goods issue date and you use it as a reference for the pricing date, then both dates will be different & that's OK. The same would happen if a discount is changed after the Sales Order is introduced but before billing & a new price determination takes place during billing.
    IMHO the Billing Document is the critical document and needs to have the right VAT rate.
    The Sales Order should have the data calculated based on the best information available at creation time, but does not need to be corrected after Billing.
    Best Regards,
    Franck

  • COMMPR01 Condition Rate vs ERP Moving Average Price

    Hi,
    Can someone please explain how the COMMPR01 product u2018condition rateu2019 is maintained in SRM?
    The reason Iu2019m asking is that the ERP moving average for the same material is different from the SRM COMMPR01 u2018condition rateu2019 value.
    This causes a problem because we source our MDM catalog data from ERP instead of SRM. If a shopper shops via the SRM internal catalog for a material that also resides in MDM, the shopping cart will show two different prices. The
    Is this a bug or are we doing something wrong?
    Thanks,
    Jerry

    Hi,
    You cannot maintain the condition rate in SRM for the materials which are replicated from backend, it will be applicabel only for the locally maintained materials.
    Regards
    Jagadheesh

  • (Condition rate not showing in sales order correctly.

    Condition rate not showing correctly in Sales order. it has maintained  perfect in condition record. Please provide me the programe which can retrive the correct rate in sales order.

    Hi,
    Including above suggestions, try if Pricing date is coming. If not, this may be one of the cause. Go to VOV8, select your doc type and in "Pricing date/purchase order date" section, check the "prop for valid-to" and "valid-from" settings. Buth should be blank.
    Reward if sorts out your issue
    Regards
    SD

  • Create a chart from subtotals

    I have a daily expense register with 4 columns: date, amount, type of expense, and description. The table is categorised by the expense type column. I have inserted subtotals based on the amount column. I am trying to create a chart that shows the percentages of each expense type (e.g. groceries 35%, petrol 20%, etc.)
    These are sample entries:
    28/5/10 35.00 Groceries [Description]
    28/5/10 42.00 Petrol
    29/5/10 12.00 Dry cleaning
    29/5/10 38.00 Groceries
    When I add categorisation feature, I get:
    Groceries (Subtotal: 73.00)
    28/5/10 35.00
    29/5/10 38.00
    Petrol (Subtotal: 42.00)
    28/5/10 42.00
    Dry cleaning (Subtotal: 12.00)
    29/5/10 12.00
    I want to see a pie chart based on the categories Groceries, Petrol, +Dry cleaning+ and the amounts 73.00, 42.00, and 12.00.
    Could someone please advise how to do this? I can only create a pie chart with the individual transactions which is pointless since there are hundreds of entries.

    Hi c,
    "Table 1" is the default name given to the first table on a sheet. As you've changed the name of that table to "Spending Journal", the formula in B2 of the Summary table should read:
    =SUMIF(Spending Journal::Category,A2,Amount)
    Fill the formula down for as many categories as you have.
    List the categories in column A, starting in A2. They may be listed in any order, but each must be exactly the same as one of the categories in the popup list.
    I don't understand how to refer to a specific item in the (popup) list and then how to put that in a condition statement.
    From the iWork functions and Formulas User Guide,
    SUMIF
    The SUMIF function returns the sum of a collection of numbers, including only numbers that satisfy a specified condition.
       SUMIF(test-values, condition, sum-values)
    • test-values:  The collection containing the values to be tested. test-values is a collection containing any value type.
    •condition:  An expression that results in a logical TRUE or FALSE. condition is an expression that can contain anything as long as the result from comparing condition to a value in test-values can be expressed as a Boolean value of TRUE or FALSE.
    • sum-values:  An optional collection containing the numbers to be summed. sumvalues is a collection containing number, date/time, or duration values. It should have the same dimensions as test-values.
    For your case:
    test-values: the values in the "Category" column of the "Spending Journal" table.
    condition:   the value in cell A2 (of the summary table, the table containing the formula)
    sum-values: the values in the Amounts column (of the "Spending Journal" table)
    Numbers displays both the table name and the column name in the first reference as the document contains two columns named "Category".
    The table is not named in the second reference as the formula is on the same table as the referenced cell.
    And the table is not named in the third reference as the document contains only one column named "Amount".
    Regards,
    Barry
    PS: If you're expecting to work with other functions or formulas you should, if you haven't already, download the iWork Functionns and Formulas User Guide, available through the Application menu in any of the iWork applications.
    B

  • CRM Exchange order - shipping condition not copied from Sales order

    In CRM Web client when we create an exchange order with reference to the sales order the shipping condition is copied from the BP sales area data instead from the original order.

    Hi
    Check this link
    http://learnsaptips.blogspot.com/2010/09/text-type-configuration-in-sap.html
    regards
    Prashanth

  • Tax condition value is not calculating based on condition rate maintained

    Hi,
    I have maintained the condition rate as 4% for a condition type against a tax code in FV11. and also the validity period is correct.
    But when I select the tax code in purchase order and click on taxes button, some other condition value is coming in condition value field for that condition type. for example the PO price is 100Rs. the condition value has to  be 4% on 100Rs that is 4Rs. but some constant value is coming 5, even if change the condition rate in FV11 as 0%, the condition value is coming as 5 only.
    Does anybody faced this issue.??

    Hi
    for example the PO price is 100Rs. the condition value has to be 4% on 100Rs that is 4Rs. but some constant value is coming 5, even if change the condition rate in FV11 as 0%, the condition value is coming as 5 only.
    try this
    change your PO value and then observed the changes ,IF then  your are getting value different than 5 ,then i think there is no problem in your tax  procedure because you are saying after 0% in FV11 also your are get 5 only in PO
    as per me you can not put any constant value in tax procedure ,we only map how tax calculation will below for condition
    and check your condition record for that vat condition again in FV13
    Regads
    Kailas ugale

  • How to stop non statistical condition type value from updating total amount

    Gurus,
    Can any body explain me how to do following setting,
    How to Stop non statistical condition type value from updating Total Amount
    Regards,
    Sai

    Dear Sai,
    You need to make that condition type as Statistical one
    Go to SPRO - Sales and Distr. - Basic Functions - Pricing - Define and Assign Pricing Proc - Maintain Pricing Proc - Control Date
    Select the proc. - select the condition type and activate the  check box Statistical
    This will show the amount of the condition but will not consider for the net value calculation
    Hope this will help you
    regards,
    Sagar

  • Tax condition records replication from r/3 to CRM.

    Hi,
    We are on CRM 5.0 and backend is 4.7. We have downloaded all condition objects from r/3 to crm. When I tried to create an order everything is determined in CRM (R/3 pricing procedure, PR00) but for tax conditions.
    Where I can view the condition records downloaded from R/3 in CRM system?
    Thanks in advance.
    Srinivas

    Hi Nitin,
    I believe the maintenance of the condition type is done in R/3. If this is the case then in R/3 you can go to the following path
    Under SPRO ->SAP Customizing Implementation guide ->Sales and Distribution -> Basic Functions -> Pricing -> Pricing Control ->Define Condition Types.
    Here for the condition type you wiill maintain the "Condition Class" and  "Calculation Type". Once it is maintained You can trigger DNL_CUST_CNDALL to bring it down to CRM.
    you can monitor the trigger that you did using SLG1 transaction.
    Thanks
    Abishek

Maybe you are looking for

  • "java.lang.NoClassDefFoundError" error while run t-code SXMB_IFR in XI

    Hi When I am trying to run t-code <b>SXMB_IFR</b> in Xi it give me below error. <b>Exception Details Exception class: java.lang.NoClassDefFoundError Message java.lang.NoClassDefFoundError Stacktrace Thrown: java.lang.NoClassDefFoundError: null      a

  • [SOLVED] multipath-tools build fails because file is not a directory

    Hi all, I'm trying to build the multipath-tools-git AUR package (I'm playing around with virtualization, and need the kpartx tool). I tried building, and got this output: (NOTE: /home/gregory/AUR PACKAGES is symlinked to /mnt/STORAGE/AUR PACKAGES, wh

  • PDF's not loading in browser - Internet Explorer 9, Adobe Reader X, Win 7 x64

    I have Adobe Acrobat Reader installed and have a site that uses forms that need to be filled and submitted.  The problem is that when I open the form, they are opening in a seperate Window. I've uninstalled and reinstalled Adobe Reader I've done 'det

  • Via Sky HD

    Hi, I signed up for Infinity 1 on line yesterday and it is due to be installed on the 2nd of August. I can't seem to find a way at this stage to have it authorised to view via my Sky HD box, if I follow the link to authorise my card it wants to take

  • A question on bulk collect

    My Version Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ProductionPls see the code below declare type empno_arr_type is table of int; empno_arr empno_arr_type; begin select empno  into empno_arr from emp; end; Output PLS-00642: l