PR00 instead of Va00

Dear All,
In variant configuration can we use PR00 condition type instead of VA00 condition type for determining the price for the configurable material.
Thanks and Regards
Praveen S

Hi Praveen,,
Hope u r well known to concept of VC..
PR00 is basically used to find base price of materails , now why we need to create VC object becoz v hav n no. of variant for that it dificult to material master..thats y v maintain Varriant object and so on..
Varriant key is maintain to find out the value of object  under varriant condition.(VK11 with ref to VA00 )..
correct me if i went wrong..
thanks
mk

Similar Messages

  • How to read XKOMV-EDATU, XKOMV-KBETR fields inside java

    How do get the 
    XKOMV-EDATU date and pass it to ItemUserExit.java for database read and filtering.
    a. The code in ItemUserExit has to filter ZCPI2-ZSPMON for this date XKOMV-EDATU, the delivery date.
    This does not work. prItem.getPricingTimestamp returns the current date always, NOT delivery date.
    What is the method call that will grab this date.?
    b. How do I have to pass this XKOMV-EDATU date to ItemUserExit.java for database read / filtering.
    c. The field XKOMV-KBETR has to be read based on the KSCHL = ‘ZCP1’ and / or KSCHL =’PR00’.
    These are abap structures. But I am not sure how to read this value inside java.
    How would I extract the structure XKOMV-KBETR(the rate) for KBETR(conditionType)=’PR00’ .
    Please note that I get an error mandatory condition PR00 is missing. (see attached error message ).
    d. “CPIW_A” set up in ItemUserExit.java :: itemUserExitAccess.addItemAttributeBinding("CPIW_A", ZVALUE_CPIW_A );
    is NOT available at PricingUserExits.java with the code:
    prItem.getItemAttributeBinding("CPIW_A") ,
    though they are registered in the method
    “determineRelevantAttributesForValueFormula” as per the help html pages.
    I had attached the code.
    Can you scan thru the code and give feedback.
    Can I call you in the morning.
    Thanks.
    TK
    PS:
    I get an error “PR00” mandatory condition is missing from the log file.
    ======
    OP="ChangeDocument" ID="34800003" STATUS="200" />objectIds[1]=07F9101FD1D0AD4686B2411E3EFB2DF1&messageTypes[1]=E&messages[1]=Pricing error: Mandatory condition PR00 is missing&areas[1]=SPE&numbers[1]=801&args1[1]=PR00&args2[1]=&args3[1]=&args4[1]=Nov 11, 2005 12:41:37... ...p.sxe.socket.server.rfc.RFCConnection JCO.ServerThread-3 Info: response time of command C
    However, I get the response header as:
    availableItemConditionTypeNames[1]=PR00&availableItemConditionTypeNames[2]=VA00&availableItemConditionTypeNames[3]=ZA00&availableItemConditionTypeNames[4]=ZOUT&availableItemConditionTypeNames[5]=ZCRT&availableItemConditionTypeNames[6]=K004&availableItemConditionTypeNames[7]=RA01&availableItemConditionTypeNames[8]=RB00&availableItemConditionTypeNames[9]=ZB00&availableH
    CODE:
    ItemUserExit.java snippet:
              qrypair2[0]  = new sys_query_pair("ZCPI", <b>"200501"</b>, sys_query_pair.GREATER); //
              projection = new String[] { "ZCPI" } ;
              sorting = new String[] { "ZCPI" } ;           res resultSet = database.db_read_first_row("ZCPI2", qrypair2, projection, sorting);
    I need to pass the XKOMV-EDATU date field in the above bolded date field.  I think this field is available thru the API for IPricingItemUserExit  inside the overwriteConditionValue method's parameter .
    METHOD
    overwriteConditionValue:
         public BigDecimal overwriteConditionValue(IPricingItemUserExit      prItem,
                                                             ILastPrice                lastPrice,
                                                             IPricingConditionUserExit prCondition,
                                                             int                       valueFormNo) {
              String sold2party = "", strCPIW_A = "", strCPIW_B = "";
              BigDecimal condValue = prCondition.getConditionValue().getValue();
              BigDecimal netValue  = prItem.getNetValue().getValue();
              String prod = (prItem.getProduct()!=null)? prItem.getProduct().toString(): "NULL";
              SAPTimestamp  priceTstamp = prCondition.getConditionFindingTimestamp(); //prItem.getDefaultConditionAccessTimestamp();  //getPricingTimestamp();
              String strTstamp = priceTstamp.formatYYYYMMDD();
              //KOMP-EDATU ??
              logInfo("valueFormNo: " + valueFormNo +  " Condition Table type:"  + prCondition.getConditionTypeName() +
                         ", condVal:" + condValue + ", netValue:" + netValue + ", KOMP-EDATU:" + strTstamp );
              switch (valueFormNo) {
                   case 601:
                             try{
                               sold2party = prItem.getHeaderAttributeBinding("SOLD_TO_PARTY").getValue().getValue();
                               IAttributeBinding iamCPIW_B  = prItem.getItemAttributeBinding("CPIW_B");
                               IAttributeBinding iamCPIW_A  = prItem.getItemAttributeBinding("CPIW_A");
                               if( iamCPIW_A !=null) strCPIW_A = iamCPIW_A.getValue().getValue();
                               if( iamCPIW_B !=null) strCPIW_B = iamCPIW_B.getValue().getValue();
                             }catch(Exception e) {
                                  logInfo("EXCEPTION @ GetAttributeBinding exception : " + e.getMessage());
                             logInfo("sold2party: " + sold2party + " strCPIW_A, strCPIW_B: " + strCPIW_A + ", " + strCPIW_B);
                             String CPIW_A = null, CPIW_B = null, BASE_PRICE = null;
                             logInfo("overwriteConditionValue " +
                                   "_CPIW_A: " + _CPIW_A + ", _CPIW_B: " + _CPIW_B + ", _BASE_PRICE: " + _BASE_PRICE );
                             double l_cpiw_a, l_cpiw_b, l_base;
                             if( _CPIW_A == null || _CPIW_B == null || _BASE_PRICE == null) {
                                  logInfo("overwriteConditionValue *tk* static _CPIW_A.... NULL. returning 999999L" );
                                  return BigDecimal.valueOf( 0L );
                             }else{
                                  l_cpiw_a = Double.valueOf(_CPIW_A).doubleValue();
                                  l_cpiw_b = Double.valueOf(_CPIW_B).doubleValue();
                                  l_base   = Double.valueOf(_BASE_PRICE).doubleValue();
                                  logInfo("overwriteConditionValue *tk* ???? using STATIC Class Variables" );
                             logInfo("overwriteConditionValue " +
                                   "cpiw_a: " + l_cpiw_a + ", l_cpiw_b: " + l_cpiw_b + ", l_base: " + l_base );
                             double fraction = (l_cpiw_a - l_cpiw_b)/l_cpiw_b;
                             logInfo("overwriteConditionValue " +
                                       "*tk* double fraction: " + fraction );                                               
                             double result = l_base * fraction;
                             logInfo("overwriteConditionValue " +
                                       "*tk* double calculated Result: " + result );                       
                             BigDecimal retValue = BigDecimal.valueOf (Math.round(result));
                             condValue = retValue;
                             try{
                                  prCondition.setConditionRate(retValue , "USD");     
                             }catch(Exception convEx){
                                  logInfo("overwriteConditionValue " +
                                                           "*tk* converstion Rate Exception " + retValue );
                             prItem.setObjectForUserExits("XKOMV_KBETR_C", retValue);
                             logInfo("overwriteConditionValue: 601 conditionRate Return Value: " + retValue );
                             return retValue;
                   case 602:
                             /* Forecasted CPI-W value = ( ( D * ( ( A – B ) / B ) )  – ( D + C ) ) */
                        double A = Double.valueOf( PricingUserExits.ZCPI2_ZCPI ).doubleValue();
                        double B = Double.valueOf( PricingUserExits._CPIW_B ).doubleValue();
                        double C=0, D=0;
                        BigDecimal bdC = (BigDecimal)prItem.getObjectForUserExits("XKOMV_KBETR_C");
                        C = bdC.doubleValue();
                        D = C * 0.8;  // just for calculation verification.
                        // C = Double.valueOf( PricingUserExits.XKMOV_KBETR_C ).doubleValue();
                        // D = Double.valueOf( PricingUserExits.XKMOV_KBETR_D ).doubleValue();
                        logInfo("overwriteConditionValue " +
                                                           "*tk* A, B, C, D: " + A + ", " + B + ", " + C + ", " + D);
                        double res1 =  A - B ;
                               res1 =  res1 /B ;
                               res1 =  D * res1;
                        double res2 =  D + C ;
                        double CPI_W ;
                               CPI_W = res1 - res2; //– res2;
                        BigDecimal retn =  new BigDecimal(CPI_W) ;
                       logInfo("overwriteConditionValue *tk* case 602 returning - " + retn );
                        return retn; // new BigDecimal(99999L);
                   default:
                        throw new FormulaNotImplementedException(prItem, "value formula", valueFormNo);

    Java != javascript.
    You can not call java directly from javascript.
    The lifecycle:
    Request received
    Java/JSP runs produces an HTML page
    Java stops running
    Javascript runs on page when page is loaded.
    The only way to call java code again is to submit a request and get the result back in a response. Traditionally the response is a new JSP page to replace the old one.
    Using AJAX the response can be just information that you then alter the current page with.
    The first example given by skp71 will probably NOT be what you are after. The java code is executed when you load the page, NOT when you push the button which is most probably what you are after.
    AJAX is a solution, as is loading a new page.
    Cheers,
    evnafets

  • Variant Pricing - Passing a Z* condition to a quote

    Wondering if anyone knows how to pass a z condition to a quote from the configuration.  We have variant pricing working for the VA00 pricing conditions, but would like to pass across a Z condition.  Any ideas?

    So instead of VA00, we have Z-PG.  In a normal pricing procedure, I set the characteristic that is set to SDCOM-VKOND (VAR_PRICE) to the name of the VA00 condition and then do a $SET_PRICING_FACTOR.  How does it know to look at Z-PG instead of VA00? 
    Example of code of how we do the variant pricing for VA00:
    $SELF.VAR_PRICE = 'FCM_CHARGE'
    $SET_PRICING_FACTOR ($SELF, VAR_PRICE, 'FCM_CHARGE',CABLE_FIBERS)
    FCM_CHARGE is set up under VA00.
    How would the code look to find the condition under Z-PG?

  • Error in varient price

    im getting error in varient configuration.
    my main item is cd1
    varient color is red, blue, black
    im maintaing pr00 for cd1, and va00 for red,blue,black.
    cd1 price is RS.500(pr00)and vairents price red RS.10, blueRS.15, bnlack RS.20.
    when i raised sales order and im selecting black varient my price should be 520, but im getting 500 only main materil price.
    plz give me the suggestions

    main item is cd1
    varient color is red, blue, black
    maintaing pr00 for cd1,
    va00 for red,blue,black.
    SOLUTION
    goto CT04 and create a characterictic Zprice
    Now goto Cl02 and include it in the class which ucreated earlier and assigned the char Zcolor ...
    Now goto CT04 and take Zcolor .. goto values .. and select Red and then create object dependency -
    give code as $self.Zprice = 'A1' for RED and then for blue again give code as $Self.Zprice = 'A2', and then for Green obj dependency as $self.Zprice = 'A3'
    now goto Vk11 ..give Va00 as cod type, and enter
    give A1 = 200
    A2 = 300
    A3 = 400
    and then save ... dont give red, green etc here in VK11
    now create profile in CU41
    run order and select red u will get price in VA00 which u have maintained for A1 in Vk11.
    Reward if useful
    Krishna
    cd1 price is RS.500(pr00)and vairents price red RS.10, blueRS.15, bnlack RS.20.
    when i raised sales order and im selecting black varient my price should be 520, but im getting 500 only main materil price.
    plz give me the suggestions

  • Prices&Conditions - Unable to Copying Conditions

    Hi Gurus,
    I have an issue that when I try to use 
    Tx VK12
    Price Conditions PR01
    Sales Org GAMB
    Dist Chan ES
    Customer account 1----
    I highlight materials where conditions are applied and I try to copy over to other customer accounts (at this point I click the icon Copy Condition) but the following message appears:
    Copying is incomplete because no rules have been defined.
    Copying rules for condition type do not contain A 1 V 2 PR01 3 entry
    The same process is successfull when applied to:
    Tx VK12
    Price Conditions PR00 (instead of PR01)
    Sales Org GAMB
    Dist Chan ES
    Kindly explain why is this issue could be arrsing with condition type PR01 and not with PR00 and how can solve it.
    Thanks
    Bawa

    Hi,
    check entries here.
    IMG>SD>basic functions>Pricing>Copy Control For Conditions.
    Regards,
    Chandra

  • VPRS instead of PR00

    Hi Gurus,
    I need to use VPRS as a pricing elment from which pricing will be calculated instead of PR00 for one pricing procedure, please tell me how to do that?

    Hi Friend,
    This is how it goes :- 
    1. Set VPRS to be the first step in the pricing procedure and to be subtotal B (as standard). 
    2. Set PR00 with alt. calc. type formula, which sets the value of PR00 to be equal to the subtotal B. 
        The routine (created with transaction VOFM) is: 
    RV64A901
    FORM FRM_KONDI_WERT_600. 
        XKWERT = KOMP-WAVWR.
    ENDFORM.
    The pricing procedure than looks like that: 
    Step 1 VPRS statistical, subtotal B, reqt 4 
    Step 2 PR00 Altcty 600

  • Pr00 decimal values needs instead off rounding the value

    In export sales Pr00  condition value is rounding off i need to be in decimal values
    i have checked in Condition type V/06 rounding fields it is not effecting  and also OB90 and OY04
    example rounding  off  26 USD, but at actual it should 25.58 exchange rate is 43 and qty is 100
    can any body suggests where the setting ar required

    Hi,
    Please check the Rounding rule property of the condition type 'PR00'. It must have been set to Round up rather than Commercial.
    Change the Rounding rule property to Commercial. I guess this will solve your purpose.

  • Pricing conditions EK01 and PR00 in pricing procedure

    Hi Gurus,
    We have a process in which a SD billing request is generated by using DIP profile (DP90). Pricing condition used in the pricing procedure for the sales document is EK01 (which brings the actual cost of the service order that creates the Billing request through DP90) but it happens sometimes that EK01 is not desired but instead PR00 ( another price agreed with a certain client instead of the actual cost in the order).
    In order to match this need, best would be to combine both conditions (EK01 and PR00) in the same pricing procedure, and as a general rule, EK01 will apply in the billing request price, but in case PR00 condition exists, then this one will prevail and EK01 will be in the price conditions but will not be taken into account in the price calculation--> how can this be done in the pricing procedure?
    Another possibility would be using different pricing procedures so that one has EK01 as pricing condition and  the other one has PR00. The pricing procedure will be assigned by using document pricing procedure assigned to a different document type but this is not the desired solution as it makes much more tricky the design: another dynamic item profile would be needed so that proper document type is assigned.
    Thanks for your great help in advanced!
    VL

    Hi Victor,
    You can put both of the conditions in the same pricing procedure and use the exclusion group to compare the conditions and choose the favourable as per you requirement.
    I hope this will certainly help you in solving your problwm.
    Regards,
    VB

  • Exch rate for cond. PR00 in invoice.

    Dear All,
    Assume that an item is invoiced for 1 EUR, and it is converted to doc. currency (USD) via an exchange rate.
    I don't want to carry out a new pricing, but instead use the one coming from sales doc, but I want to change the exch. rate in condition PR00, calculation of price.
    I tried  VTFL img but did not help.
    Best regards.

    Hi Mahmet,
    If you want the pricing exchange rate to be copied from the sales order you need to select the option of
    A in the PRICING EXCHANGE RATE in VTFL at item level
    regards,
    santosh

  • PR00-Value

    Hi all,
    When I go to the Conditions tab of a line item and try to give the PR00 value manually more than 6 digits, system is throwing me a error. Where as if i change the Currency from USD to RMB, system is allowing me to enter 7 digit number.
    But i want to enter more than 6 digits for USD currency.
    where is this controlled?
    thanks in advance,
    Cheers,
    Anil.

    Dear Anil
    It is not  recommended to change the standard settings.  Instead, what I would suggest is that you maintain the PR00 value for USD in multiples of 100 and for print out, you can define a logic in smartform  in such a way that wherever, the unit price is other than per piece or per kg, it should consider the value flowing in condition tab divided by per piece
    thanks
    G. Lakshmipathi

  • Change condition origin for PR00

    hai,
    I want to change the condition origin for the condition type PR00
    where will u change the condition origin for a particular sales condition type.
    condition origin option:
    A- Automatic pricing
    B-
    C-Manually
    Its there like that.
    I want to change that condition origin there.
    Thanks in advance
    by
    babs

    hi,
    i am not asking for manual entries in condition type PR00
    i asked condition origin which can be seen while creating sales order.
    select item condition
    select PR00
    select overview icon
    there u can see condition origin
    below condition control
    i want to change that condition origin
    condition origin option:
    A - Automatic pricing
    B - Duplicated from main item
    C - Manually entered
    D - Header condition
    E - Item total
    F - Condition supplement
    etc
    here i want to enter A instead of C
    Thanks in advance
    by
    babs

  • Default Pricing in PR00 condition

    This is in MTO Quotation Process.....
    1.EK01 and Markup are the 2 ITEM condition types which we use without any condition records.
    .In pricing procedue
    1.STEP-1--EK01 is the cost which reads from UNIT COSTING of the Particular Item.++
    2.Step-2--Markup will be applied based on customer and material.++
    3. Step-3--Cost + Markup++
    4.Step-4ZP00 is the condition type the value of step-3 which populates to condition value field-which is =EK01 + Markup and it is statistical condition type and cannot be edited manually.++
    5.Step-4Pr00 priceNow our requirement is that , ZP00 value should be defaulted as our basic price PR00 and if there is no value in ZP00 condition line then it should take ZERO, where in user can enter it manually.
    6. This is alternative condition type formulae which has been assigned for ZP00 condition type.
    Price difference (WWS)
    form frm_kondi_wert_012.
      if xworkd ne 0.
        xkwert = xworkd - xworke.
      else.
       xkwert = 0.
      endif.
    endform.+Can we write Alternative condition type and assign it to PR00 condition in Pricing procedure...saying that Condition value of ZP00 to be flown to PR00 condition, if no value found make PR00 as Zero.
    In such case what are the tables i have to consider to tell to my ABAPER and what prcautions i have to take.

    I like to suggest below;
    1) Remove the statistical check assignment for the condition type ZP00. This means you need to assign the account key similar to PR00.
    2) Then assign the step number of ZP00 in the from column for the condition type PR00.
    I assume this should pull the value. Since ZP00 and PR00 are assigned before gross value and PR00 comes after ZP00, the system will always consider the PR00 value.
    I am just curious, why you need ZP00? Instead you can have PR00 and you can assign the same routine to PR00. I think this is simplest and easily manageable.
    Regards,

  • PR00 should automatically display while creating sales order

    Hi,
    PR00 should automatically display in sales order and i have to enter price only without maintain condition record.
    i dont want to enter PR00 and price.
    PR00....................................1000
    Defaultly that pr00 should be display in the sales condition and price filed should be blank.
    so that i can enter price for that condition type PR00.
    my client dont want to enter condition type every time.
    Thanks in advance
    by
    babs

    Hi,
    Thanks for ur reply.
    But my requirement is not that.
    I am creating sales order and entered customer number, material and qty.
    now system throw an error PR00 Mandatory pricing missing
    In Item overview  select condition tab
    There u have to enter PR00 ............1000
    Instead of this, PR00 should be there and price field should be blank.
    now i can enter only price for PR00 condition type.
    I dont want to select condition type(PR00) each and every time while entering price.
    I hope now you understand my requirement.
    Thx in advance
    babs

  • "PR00" - Calculate wrong price

    Dear Expert,
         Condition Type"PR00" calculated a wrong price. For example,
    I have set 1 Box = 60 PSC; and I have set 1 Box equal 60$ (via VK11).
    If I insert 20 PSC in sales order, condition "PR00" show 19.98$ in that item line. (it should show 20$ instead).
    P.S. if I set 60 PSC = 60$ (in VK11), it will not have any problem. I realize that it is about "Cond. base value". But my client has to set price list in term of "BOX". How can I fix this problem?
    Thx,
    Prach

    Hi,
    PR00 is calculating correct....let me explain u how system is doing
    u said 1 Box = 60 PSC and ur sales order qty is 20 PSC
    => ur sales qty in Box is 0.333 (system will never consider 0.333333333333 so on in that case u will get 20)and ur 1 Box = 60$ =>19.98
    i assume ur decimals are going to three places..
    solution...use rounding concept
    I hope ur issue should get resolved, if so reward
    Regards
    jagdish

  • Can I show a color bar instead of a color bullet in iCal Monthly view for all my events in all calendars?

    In the Monthly view of iCal the only events that show a color bar in the event is the Birthday Calendar. All other events in all my other calendars only show a color bullet next to the event (unless I click on that event which then shows as a color bar). I would like to know if it is possible for all the calendar events to have a color bar in the monthly view instead of just that tiny color bullet.

    Greetings Judith,
    Before making any attempts at deleting calendar data, backup what you have just in case:
    Click on each calendar on the left hand side of iCal one at a time highlighting it's name and then going to File Export > Export and saving the resulting calendar file to a logical location for safekeeping.
    iCal has an automated function located in iCal > Preferences > Advanced > Delete events "X" days after they have passed.  By typing in a value for days you can tell iCal to delete all events before that time frame.
    Example:
    Today is 4-16-2012.
    If I wanted to delete all events prior to 1 year ago (4-16-2011) I would type in "365" for the number of days.
    Once you type in the number of days you want kept in iCal, close the preferences and then quit iCal.
    Re-open iCal and check to see if the events are gone.  If not you may want to leave it open for several minutes and then quit again.
    Once the events are removed go back to  iCal > Preferences > Advanced > Delete events "X" days after they have passed and make sure the check mark is removed to prevent future deletion.
    Hope that helps.

Maybe you are looking for