VOFM pricing routine

I have a requirement where I need to check pricing condition for BOM material.The requirement is that,if the material is a BOM in a sales order,then the pricing routine should trigger for its sub material. The problem we are facing is that the pricing routine is not getting triggered for the sub material. If anybody have worked on such requirement ,please give some input.I want the pricing routine to be triggered for the submaterial.

Hi ,
      Whatever logic u write in ur routine .The final value which will go out from the routine is xkwert which is condition value .so in ur logic you will have to populate a value to the field xkwert .

Similar Messages

  • Pricing Routine for Purchase Order (VOFM)

    Hi,
    I just create a price routine (VOFM->Pricing) for purchase order in order to clear some condition types (for example ZR97) in item conditions. In the routine, I just check the xkomv-kschl, if it's ZR97, clear xkomv, it works in routine itself, but after back the main program(ME21N), it's been reset as before, so there is still condition type 'ZR97' in the current purchase item.
    Any idea?!
    Thanks in advance

    Hi,
    Keep a debug point check if the routine is getting called or not and also check whether the values is actually clearing the value xkomv.
    Sometimes xkomv may get cleared but actually the value may be getting reset at the PO level. Check which variable is the one that is actually getting filled in the PO
    Regards,
    Narayani

  • Pricing Routine - unable to enter new net price in sales order

    Hi all,
      I have a routine 993 in sales order which is in Column 'Bas Type' in pricing procedure .  The routine has statement like this that calculate the unit price:
      If xkomv-kbetr is initial.
            xkomv-kbetr =  komp-netwr /  kmeng  
    Endif.
    This calculate the net price which appear in the column 'Amount/Net Price.   In the order, the user can change the net price in column 'amount'.  However, if i remove the line  "If xkomv-kbetr is initial",   the user can change the amount, but the amount value will stay as the original amount.  I don;t understand why this happen.   I have been debugging saplv61A (FM Pricing) but unable to get the flow.   Can anyone pls provide guidance ?
    Thanks
    Joyce

    Hi Joyce,
    I'm just wondering how you solved this issue - would it be possible to post a solution please?
    I have a similar issue (KBETR field is overwritten, after I change it in my VOFM routine)
    I posted my question here:
    VOFM (Pricing Condition) FREIGHT - unable to edit Amount value (KOMV-KBETR)
    but haven't received any replies!
    Would appreciated any help you can offer.
    Thanks.

  • Pricing routine 901 in the pricing procedure

    Can you tell me in detail (step by step) How to write pricing routine 901 in the pricing procedure?
    I know ABAP coding. I am new to SD (pricing).
    The only thing I know is the VOFM 901 Pricing Routine development is in ABAP program RV64A901.
    Purpose : Pricing Routine for calculating the price difference due to increase or decrease in the copal contract price from the copal actual price
    Description :
    Routine 901 : Copal Difference Calculation
    The formula to be used is : Copal Adjustment = ( Copal Contract Price + Copal Actual Price ) x Amount of Copal / 1000
    Where
    Copal Contract price is the condition type Y001 from the pricing procedure Z00003.
    Copal Actual price is the condition type Y002 from the pricing procedure Z00003.
    Amount of Copal is the condition type Y005 from the pricing procedure Z00003.
    Copal Adjustment is the condition type Y003 from the pricing procedure Z00003.

    Hi,
    Go to the transaction VOFM.
    In the menu..Choose...Formulas -> Condition value
    At the of the table ..Enter 901 and give the description..
    Then select that row and press source text button or F5.
    It will ask for the access key...
    Get the access key for the corresponding object
    R3TR PROG RV64A901
    Then in the code..
    READ TABLE XKOMV INTO LWA_Y001 WITH KEY KSCHL = 'Y001'
                                                      KPOSN = KOMP-POSNR.
    READ TABLE XKOMV INTO LWA_Y002 WITH KEY KSCHL = 'Y002'
                                                      KPOSN = KOMP-POSNR.
    READ TABLE XKOMV INTO LWA_Y005 WITH KEY KSCHL = 'Y005'
                                                      KPOSN = KOMP-POSNR.
    Sum up the values in LWA_Y001, LWA_Y002 & LWA_Y005
    And then move it to XKWERT
    Thanks,
    Naren

  • Pricing routine is not called even after assigning it in pricing procedure.

    Hi
    I created a pricing routine (Condition value) for one ZCondition type. I saved it in the workbench request. Functional consultant assigned this pricing routine to condition in Pricing Procedure. The routine was called while creating a PO. It works perfect in development system. But after we transported to quality server the routine is not getting called. Routine is displayed in pricing procedure in quality server. Routine program also exists in quality server. But the program include statement is not found in standard program RV64ANNN in quality. But in development the include statement appears in this program. How this program was not modified in quality server after transport? Its a SAP standard program and it was not saved in any request and was not modified manually too.
    Can anyone explain me what could be the reason that the program RV64ANNN is not updated in quality server to include the routine?
    How can we update this program without modifying it manually?
    Would deleting the pricing routine and recreating it help resolve this problem?

    Hi,
    Refer to the following Notes:
    [Note 22808 - Transferring formulas|https://service.sap.com/sap/support/notes/22808]
    [Note 388998: VOFM: Check report for entries in TFRM/TFRMT|https://service.sap.com/sap/support/notes/388998]
    [Note 28683: PERFORM_NOT_FOUND: VOFM routine is not active|https://service.sap.com/sap/support/notes/28683]
    Note 22808 - Transferring formulas is the first place you should look.  FYI, there is a lot of information on this topic available by searching for SAP Notes that have "RV80HGEN" and/or "VOFM" as keywords.
    Regards,
    Jamie
    Edited by: James Gaddis on Mar 19, 2008 10:59 AM - Added an additional SAP Note number and comment about searching for more Notes.

  • Get Delivery date(EKET-EINDT) in MM Pricing routine(group condition)

    Hi All,
    I have created an MM pricing routine RV65A092 in VOFM. So when creating PO(ME21n), this routine will trigger..
    Now the problem is I need EKET-EINDT for grouping condition. It was mentioned to call program SAPLMEPO and get EKET data.
    Please help me how to get delivery date in that routine  which is filled in Item level during PO creation
    Thanks
    Ram

    Hi Ram,
    For SD you have the SAP Note 531835 - Using field PSTYV in the condition access. For MM is simmilar, although you must use the enahncements. Instead use the userexits that note says, use the enhancement LMEKO001 (EXIT_SAPLMEKO_001) to populate fields ZZ in KOMK and LMEKO002 to populate KOMP.
    I hope this helps you
    Regards
    Eduardo

  • BADI ME_PO_PRICING_CUST or  VOFM Pricing Rouitnes

    Hi All,
    I need to replace distribution chain in the price determination for stock trasnport order.
    It can be done either thorugh BADI ME_PO_PRICING_CUST or  VOFM Pricing Rouitnes.
    Could you please let me know which is best way to do this.
    I should go ahead with BADI or VOFM Routine.
    Best Regards,
    Pramod Upadhyay

    hello,
    To imorove the perfomence you have to check which option will have better perfromance. one way is to check 'which option will tirgger multiple times. VoFM routince tiggers mutilple times so please check if the badi tringgers less number of time by setting break point..
    Then you have the answer!!...
    Regards
    Naresh

  • VOFM - pricing requirements ( abaper require some functional assistance)

    HI,
    I had written the required code in one of the customer routines in the transaction: vofm.
    to change the tax code according to the country of destination.
    I was given information that this will be triggered during the sales order change..(va02)..
    When i put a break point in that include it is not triggering..
    Can anyone tell me how to trigger (either std include or customerized include) of transaction: vofm (pricing requirements) in the sales order change tranx (VA02).
    thanx

    Hi there,
    Once the routine is configured in VOFM, it has to be activated for eg using RV80HGEN. Only then you can apply that routine.
    Also when the logic is not getting triggered in debug, then it means that either the logic is wrong, code has been put in a wrong location or tables / fields are called wrongly.
    Ask the ABAPer to check points & then try.
    Also changes in VA02 is captured by function V & new entry by H.
    Regards,
    Sivanand

  • IPC Java userexit-pricing routines

    Hi experts,
    I am new to IPC  java pricing routines and i have a requirement like this,
    1. The user enters manually in Quote the new price. (say cond type ZNEW)
    2. The cond record for ZTKE is available with the price as well as Max price and Min Price.
    3. The Routine formula should validate with ZTKEcondition record with maximum and minimum price available.
    4. If the new price is within the max/min range then pass it. System will do nothing and accept the manual price entered.
    5. If the price is not within the range then issue error message u2018Price not within the rangeu2019. The system does not accept the manual entry of the new price.
    Please let me know how to approach for the solution of the above.
    I know how to raise the error messages ,my main concern is to check the new price of condition type with the other condition type min n max values.
    Please provide me some pointers on it.
    Thanks.

    Hi Micheal,
    Thanks for the reply. I am not doing anything with ZTKE. I need to check with ZNEW.when user enters the new price in ZNEW condition type ,that price should be checked with the price in ZTKE with its min n max values. I.e if the entered new price is in the range between max n min values ,system will take that entered new value ,if its not it will through a error.
    So, for this i need to get the condition record value of min n max and compare with the entered new price in ZNEW and check for the above. I hope you got my point.
    Please let me knoe which way i can proced to do so....
    Thanks.

  • IPC Pricing routine for Product Family Margin in Quotation is not working

    Hi,
    I am working on the IPC Pricing Routine to calculate Item's Product Family Margin in the Quotation. 
    Process followed:
    Step 1:  Created a Group condition ZPFM for Product Family Margin and assigned to the pricing procedure. 
    Step 2:  Created a Value Routine to determine ZPFM's Condition Rate and Condition Value.
    Logic: 
              1.  Collect (Sum Of)  the Cost (ZSVC) and the Subtotal 3 of the items which are in same Material Group.
               2.  Assign the ZPFM Condition Value = Sum of Subtotal 3 - Cost.
    Issue:  The condition value for ZPFM is calculating correct for all line items except the last item.  I am getting some junk value always to the last item. If I delete the last time, again next last item is giving wrong value.  The calculation value in the routine debugging log (SM53) is showing correct value.  However, assigning the wrong value.  No other routines have been assigned to this condition type in the pricing procedure. 
    Routine Code:
    package stanley.pricing.userexits.val;
    import java.math.BigDecimal;
    import com.sap.spe.pricing.customizing.PricingCustomizingConstants;
    import com.sap.spe.pricing.transactiondata.PricingTransactiondataConstants;
    import com.sap.spe.pricing.transactiondata.userexit.IPricingConditionUserExit;
    import com.sap.spe.pricing.transactiondata.userexit.IPricingItemUserExit;
    import com.sap.spe.base.logging.UserexitLogger;
    import com.sap.spe.pricing.transactiondata.userexit.ValueFormulaAdapter;
    //import com.sap.spe.pricing.transactiondata.userexit.IPricingCondition;
    public class Z_CondValueRoutine730 extends  ValueFormulaAdapter{
       private static UserexitLogger uelogger =
              new UserexitLogger(Z_CondValueRoutine730.class);
      public BigDecimal overwriteConditionValue(IPricingItemUserExit pricingItem,
             IPricingConditionUserExit pricingCondition) {
      // Variable Declarations.
      BigDecimal conditionValueZCVC=PricingTransactiondataConstants.ZERO;
      BigDecimal conditionValueZCVCAccrual=PricingTransactiondataConstants.ZERO;
      BigDecimal subTotal3=PricingTransactiondataConstants.ZERO;
      BigDecimal subTotal3Accrual=PricingTransactiondataConstants.ZERO;
      if(pricingCondition.getConditionTypeName().equalsIgnoreCase("ZPFM")){
                IPricingItemUserExit[] prItems;
                prItems = pricingItem.getUserExitDocument().getUserExitItems();
                String materialGroup = pricingItem.getAttributeValue("MATL_GRP");
                uelogger.writeLogDebug("  Material Group  :"+materialGroup);
                for (int i=0;i<prItems.length;i++){
                     String materialGroup1 = prItems[i].getAttributeValue("MATL_GRP");
                     if (materialGroup1.equalsIgnoreCase(materialGroup)){
                          subTotal3 = prItems[i].getSubtotal(PricingCustomizingConstants.ConditionSubtotal.SUBTOTAL_3).getValue();
                          subTotal3Accrual = subTotal3Accrual.add(subTotal3);
                          IPricingConditionUserExit[] conditionsForCumulation = prItems[i].getUserExitConditions();
                          for (int j = 0; j < conditionsForCumulation.length; j++) {
                               if(conditionsForCumulation[j].getConditionTypeName()==null) {
                                   continue;
                               else if ( conditionsForCumulation[j].getConditionTypeName().equalsIgnoreCase("ZCVC")){
                                    conditionValueZCVC = conditionsForCumulation[j].getConditionValue().getValue();
                                    conditionValueZCVCAccrual = conditionValueZCVCAccrual.add(conditionValueZCVC);
                BigDecimal conditionValueZPFM=PricingTransactiondataConstants.ZERO;
                conditionValueZPFM = subTotal3Accrual.subtract(conditionValueZCVCAccrual);
               BigDecimal conditionRateZPFM=PricingTransactiondataConstants.ZERO;
               conditionRateZPFM = conditionValueZPFM.multiply(new BigDecimal ("100"));
              conditionRateZPFM = conditionRateZPFM.divide(subTotal3Accrual,7,BigDecimal.ROUND_FLOOR);
             uelogger.writeLogDebug(subTotal3Accrual+"-"+conditionValueZCVCAccrual+" = "+conditionValueZPFM);
             uelogger.writeLogDebug("Condition Rate  :"+conditionRateZPFM);
           pricingCondition.setConditionRateValue(conditionRateZPFM.setScale(2,BigDecimal.ROUND_HALF_UP));
           pricingCondition.setConditionValue(conditionValueZPFM.setScale(2,BigDecimal.ROUND_HALF_UP));
              return null;
           return null;

    Hi,
    I think you should change xkwert variable instead of komv-kwert.
    Standard routines does the same.
    Aslo check in SPRO settings that routine is attached and
    getting triggered by putting break-point.
    Regards,
    Vishal

  • IPC  java user exit- pricing routines

    Hi experts,
    I am new to IPC  java pricing routines and i have a requirement like this,
    1. The user enters manually in Quote the new price. (say cond type ZNEW)
    2. The cond record for ZTKE is available with the price as well as Max price and Min Price.
    3. The Routine formula should validate with ZTKEcondition record with maximum and minimum price available.
    4. If the new price is within the max/min range then pass it. System will do nothing and accept the manual price entered.
    5. If the price is not within the range then issue error message u2018Price not within the rangeu2019. The system does not accept the manual entry of the new price.
    Please let me know how to approach for the solution of the above.
    I know how to raise the error messages ,my main concern is to check the new price of condition type with the other condition type min n max values.
    Please provide me some pointers on it.
    Thanks.

    Hi Faiq,
    I am facing the same problem as you.
    I tried to solve it via the following code sample:
    throw new PricingRuntimeException([MessageClass], [MessageNumber], [Attributes], [RootCauseException]);
    throw new PricingRuntimeException("ZTEST", 0, new String[] {"test2"}, null);
    But no error appeared.
    Another possibility can be the following method!?
    But I do not know how to use it:
    pricingItem.getUserExitDocument().setStatusMessage(new StatusEvent());
    Perhaps meanwhile you have found another solution.
    If yes it will be nice if you post it.
    Greets Ruben

  • BAPI_PO_CREATE1 - Overriding standard pricing routine with fixed price

    Hi,
    I have to post a purchase order with BAPI_PO_CREATE1. It's important that the price in BAPIMEPOITEM-NET_PRICE is relevant for posting this purchase order and nothing else. I don't want to search for the price in any pricing routines of SAP, I want to take the price that I input explicitly.
    How can I tell BAPI_PO_CREATE1 that I want to use the fixed price in BAPIMEPOITEM-NET_PRICE?
    Thank you very much!
    Ralf

    Hi,
        if u have code for bapi_po_create1     ( purchase order creation bapi ) can u send me when i write the prog. it gave the error
           No instance of object type PurchaseOrder has been created. External reference:
    Thanks,
    mukesh

  • Issue in pricing routine

    Hi,
    I have an issue while writing code in the pricing routine. while calculating KBETR if the value is 1.035 it is rounding off to 1.04.
    Since KBETR has only two decimals it is rounding-off but client wants 1.035 only.
    Please help me.
    Regards,
    Anvesh Gummadapu.

    Hi Anvesh,
    Table for decimal decimal places in currency is TCURX .
    If ur currency does not supports 3 decimal places then may be u need to create a Z version of that currecny with 3 decimal places.
    Please check SAP documentaion [Special Output Formats |http://help.sap.com/saphelp_470/helpdata/en/9f/dba1ef35c111d1829f0000e829fbfe/content.htm]   & 
    [Defining Currencies|http://help.sap.com/saphelp_40b/helpdata/en/08/51410a43b511d182b30000e829fbfe/frameset.htm]

  • Replicate pricing routine in CRM

    Hi all,
    I'm trying to replicate pricing routine from R3 to CRM 5.0 without using IPC.
    Most of the master data and copy control is done already, pricing routine is the only one that I'm having a problem with since we don't use IPC here.
    Have anyone experienced this before?  Appreciate all the help.
    Thanks
    Gilbert

    Gilbert
    1. <a href="http://help.sap.com/saphelp_crm50/helpdata/en/8b/06f837aea75351e10000009b38f8cf/frameset.htm">How Pricing is done in CRM ?</a>
    2. <a href="http://help.sap.com/saphelp_crm50/helpdata/en/f6/6f6d28bf197247918ae66002feec75/frameset.htm">Differences in Pricing in SAP CRM and SAP R/3</a>
    3. Pricing in crm
    Happy Working !
    Thanks
    <b>Allot pointzs if this helps!</b>

  • Multiple calls of same pricing routine while saving sale order

    Hi,
    I have a requirement where I have to modify a pricing routine 9XX for sale order. In pricing procedure, I observed that this routine 9XX is assigned to multiple pricing conditions (ZNN, ZMM, ZDD etc). I saw that this routine is getting called many times in debugging for each of these assigned pricing conditions. May I know on what basis this pricing routine gets triggered multiple times for the corresponding pricing condition?
    Thanks in advance.
    Regards,
    Sri

    Sri,
    For everychange at ITEM level,Pricing mechanism will be repeated.
    You can check in debugging as below
    1.FM Pricing.
    2.Subroutine perform xkomv_aufbauen_aus_komt1.
    3.Check for the below code
      * L O O P Pricing Procedure
        loop at komt1 from komk-ix_komt1_v to komk-ix_komt1_b.
    4.Within this loop you will find a subroutine
       perform (bedingung_pruefen) in program saplv61a if found.
    Put a break point on this LOOP and check what is happening at the desired condition type while it is running through all the condition types of that Pricing Procedure.
    K.Kiran.

Maybe you are looking for

  • IN list limitation

    I would like to know if there is a limit for the "IN" statement in a query? If there is one, could i change it? Thanks

  • What is the right AppleCare ref for MB Pro Retina 15"

    Hi, I have a MB Pro Retina 15" Mid 2012. PROCESSOR 2.3GHz Quad-core Intel Core i7 MEMORY 16GB 1600MHz DDR3L SDRAM FLASH STORAGE 256GB Flash Storage Mini DisplayPort to VGA Adptr No VGA Adapter Apple Thunderbolt to Enet Adpt Apple Thunderbolt to Enet

  • Address Book weirdness...

    Ok, I have 2 accounts that I have running on my machine, one for domestic and one for business. I've made my peace with the fact I can't have multiple Address Book accounts with only 1 iCloud account.  I understand why it's impossible, and in a way t

  • Cisco ISE 1.3 failed to authenticate wireless endpoint

    Dear all, I recently have a big problem of my ISE after upgraded from version 1.2 to 1.3, the original plan is follow for wireless laptop authenticate to our network. There are 2 SSID, REG and INT, when the user and laptop first time use the WIFI, th

  • Tips on localizing rich client apps

    We are currently using a properties resource file with around 1200 lines of localized messages/text. There is also an ApplicationResource class which contains string constants corresponding to the keys in the language file. -- client_en_US.properties