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

Similar Messages

  • IPC condition value userexit - wrong condition rate

    Hi Pricing-gurus,
    I have a java condition value userexit to calculate the value for the very first price condition.
    The condition value is calculated correctly, however, the price per unit is wrong which is due to the condition rate that was not changed, also.
    If I change condition rate also in this formula, the entire pricing is wrong because the IPC carries out the pricing run multiple times (SAP: for internal reasons) resulting in a rate and value that is too high, as the changes are adding up.
    How can I change the condition rate just once? Or how how can I make sure that the formula is carried out only once during a pricing update?
    Regards,
    Michael

    Hi Pricing-gurus,
    I have a java condition value userexit to calculate the value for the very first price condition.
    The condition value is calculated correctly, however, the price per unit is wrong which is due to the condition rate that was not changed, also.
    If I change condition rate also in this formula, the entire pricing is wrong because the IPC carries out the pricing run multiple times (SAP: for internal reasons) resulting in a rate and value that is too high, as the changes are adding up.
    How can I change the condition rate just once? Or how how can I make sure that the formula is carried out only once during a pricing update?
    Regards,
    Michael

  • KONP-KBETR - Rate condition percentage - REUSE_ALV_GRID_DISPLAY

    Hi Experts,
    I have a strange behaviour with function reuse_alv_grid_display.
    (It is not used with field catalogue, but we pass the name of the structure)
    In the structure we have two fields:
      kbetr_pi02 like konp-kbetr,
      konwa_pi02 like konp-konwa.
    We read a rate condition percentage.   ( i.e.  65 % )
    If I check the condition table with tcode SE16  ( KONP )
    konp = 650
    kbetr = %
    in quality system values with % are displayed with 2 integer and 2 decimals, ( 65,00 % )
    while in production system are displayed with 3 integer and 2 decimals. ( 650,00 % )
    How is it possible???
    Thanks a lot!

    This is my data structure
    data: begin of tb_precom occurs 0,
      matnr like marc-matnr,
      werks like marc-werks,
      cuobj like marc-cuobj,
      stdpd like marc-stdpd,
      atnam like conf_out-atnam,
      atbez like conf_out-atbez,
      atwrt like conf_out-atwrt,
      atwtb like conf_out-atwtb,
      kappl like a691-kappl,
      vkorg like a691-vkorg,
      kschl like a691-kschl,
      pltyp like a691-pltyp,
      waerk like a691-waerk,
      kbetr like konp-kbetr,
      konwa like konp-konwa,
      kpein like konp-kpein,
      kmein like konp-kmein,
      kbetr_pi02 like konp-kbetr,
      konwa_pi02 like konp-konwa.
    data: end of tb_precom.

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

  • 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

  • How to change exchange rate type for specific pricing condition type

    Hello every one,
    I have a requirement for billing ie VF01.
    currently  all the exchange rate are being calculated with exchange rate type 'M' by default.
    but now client want it should calculate exchange rate with type 'E' for two pricing condition type for all others it should calculate with type 'M'
    Please any body can help me with the exit and code which i can use.
    I have checked exits SDVFX008.
    but how to change exchange rate with type 'E' only for two conditions.
    as changing exchange rate at document header will change exchange rate for all condition type.

    You need to assign KOMK-KURST = 'E', for those two condition types. If it had been item number specific, you could have used USEREXIT_PRICING_PREPARE_TKOMK(RV60AFZZ).
    Do one thing, put a breakpoint on FM 'PRICING' and then do selective runtime analysis.
    Check whether any user exit/BADI/ explicit enhancement are available when condition types are processed in a loop. If nothing is available, try implicit enhancement.
    Link to refer for selective runtime analysis - Runtime Analysis for VOFM
    Also try with VOFM requirements ( not sure whether changing KOMK-KURST is permissable in requirement as normally  we only set sy-subrc values to suppress/allow condition types ). Don't forget to assign requirements against condition types in pricing procedure.

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

  • 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

  • Change Condition price of Contract through IDOC

    Hi all,
                 I am changing  the condition type(PB00) price (KONP-KBETR) of Contract using Inbound Idocs using message type COND_A.The price is updated correctly.
                 But the change is not getting reflected in the net price (EKPO-NETPR).Is it some problem in the Idoc processing?
    Thanks in advance.

    Resolved

  • 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

  • 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 Change Exchange Rate while Preparing Goods Receipt

    Hai all,
    Help in find any user exits or BADI for changing Exchange rate while preparing Goods Receipt for Import Schedule Agreement. Or help me for re-directing system to take exchange rate from different effective date. we will be provided by us.
    Thanks & Regards
    Nagarajan M

    You need to assign KOMK-KURST = 'E', for those two condition types. If it had been item number specific, you could have used USEREXIT_PRICING_PREPARE_TKOMK(RV60AFZZ).
    Do one thing, put a breakpoint on FM 'PRICING' and then do selective runtime analysis.
    Check whether any user exit/BADI/ explicit enhancement are available when condition types are processed in a loop. If nothing is available, try implicit enhancement.
    Link to refer for selective runtime analysis - Runtime Analysis for VOFM
    Also try with VOFM requirements ( not sure whether changing KOMK-KURST is permissable in requirement as normally  we only set sy-subrc values to suppress/allow condition types ). Don't forget to assign requirements against condition types in pricing procedure.

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

  • I have one application that has requirement to do low and high speed acquisition. I want to change sample rate while running. BUT... I have E series Device

    I am writing control software for a process that is usually dull and
    requires only 10 Hz acquisition rate.  At particular times during
    the sequence, however, we are interested in looking at a couple of
    channels at 1000 Hz.  My approach so far is to configure my
    Buffered DAQ to run at the higher rate at all times.  When we are
    in the 'high-speed DAQ' mode, the program logs every point to
    disk.  In the 'low-speed' mode, I am picking off every nth (in
    this case, 10th) point to log to disk.  At all times, I update my
    GUI indicators on the front panel at a maximum of 4 times per second (I
    find that anything faster results in an uncomfortable display), so I
    fill up a FIFO with data in my acquisition / logging loop, and read the
    FIFO in the display loop.  The data in my GUI display can be up to
    250 milliseconds off, but I find this acceptable . As a side note, I
    need buffered Daq with hardware timing, as software timing results in
    lost data at 1000 Hz.
    This all works fine and dandy, but I am convinced that it is not the
    most elegant solution in the world.  Has anyone developed a
    buffered DAQ loop where the scan rate can be adjusted during
    operation?  I would like to change the rate of the E-Series card
    rather than relying on down-sampling as I am now doing. 
    The reason I have concern is that at the moment I am simulating my AI
    using MAX and when running the down-sampling routine, I consistently
    miss a particular event on the simulated data becuase the event in
    question on the simulated data always occurs at the same 'time', and I
    always miss it.  Granted, while it is unlikely that my measured
    signal and my acquisition are perfectly synchronized in the real world,
    this particular situation points out the weakness in my approach.
    More than anything, I am looking for ideas from the community to see
    how other people have solved similar problems, and to have you guys
    either tear apart my approach or tell me it is 'ok'.  What do you
    think?
    Wes Ramm, Cyth UK
    CLD, CPLI

    Adding to Alan's answer:
    One of the problems that comes with these tricks for variable-rate acquisition is being able to match up sample data with the time that it was sampled. 
    If you weren't using either of E-series board's counters, there is a nifty solution to this!  You'll be using 1 of the counters to generate the variable-rate sampling clock.  You can then use the 2nd counter to perform a buffered period measurement on the output of the 1st counter.  This gives you a hw-timed measurement of every sampling interval.  You would need to keep track of a cumulative sum of these periods to generate a hw-accurate timestamp value for each sample.
    Note:  the very first buffered period measurement is the time from starting the 2nd counter until the first active edge from the 1st.  For your app, you should ignore it.
    -Kevin P.

Maybe you are looking for

  • Unable to check certificate with root CA

    Dear All, I have an applet need to talk to a FoxPro table on the local system. Created the jar file, signed and verified, try to run in the browser (IE5.5, Win2K, JDK 1.3.1) gives me the Unable to check certificate with root CA message. What it means

  • F110 - Spool request

    Friends, after running the f110, system is generating all the payments and cheques, but in spool request it is showing only one cheque, in payment advice it is showing all the payment advices but all payment advices showing only one cheque number, wh

  • Acrobat pro 9.5.5 is printing only part of the page

    It looks fine on screen; it looks fine in the little preview when I print; but the actual printed page is mostly white, for this one page in a multipage document.  No layers.  Grey scale. This is a page that was combined with other PDF pages to form

  • Compile error with IDLJ generated java files.

    When compiling the IDLJ generated java files, javac is not able to recognize org.omg.CORBA.ObjectHelper classs. Looks like the import is not finding this class. I have located these classes in rt.jar but including this jar in CLASSPATH gives a versio

  • Dynamic IP for web service VIs?

    Hi, I use the LabVIEW Web Service Import Wizard to build web service VIs. I was wondering if there is any method to dynamically specify the IP address of a web service server. In our application development, usually we would setup an internal test se