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

Similar Messages

  • Pricing Conditions and how the pricing date is determined

    Hi all,
    Small question, i ahve some pricing conditions that use the Serives Rendered date and others that use the Pricing Date from an order, how is the condition decided on what date it uses?
    Hope i have expplained this ok, if not and you need more info let me know.
    Regards
    Steve

    Hi
    There is a difference between Service Rendered Data and Pricing Date.
    Normally Freight Conditions are maintained on Service Rendered Date so the freight will be picked on the basis of date on which the Actual Delivery done, whereas Pricing date is used for other conditions so that price will be based on the date on which the document created and the Pricing Date maintained in that.
    In the same way there is a Billing Date which came in Invoice so price will be based on the date of Invoicing.
    If you maintain the record in VK11 and test a cycle you will be able to find the difference easily.
    Regards
    Amitesh

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

  • Subtraction in the pricing procedure.

    Hello Friends,
                 I have requirement as follows:
    I have two steps in the pricing procedure. One has a condition type and the other does not. Now my requirement is to subtract the condition price of step 1 from the condition price of step 2 and display it as the condition price for step 3 which has no condition type.
    I have been suggested to create a new routine in vofm and assign that in the pricing procedure.
    Is there any otherv way of doing this?
    If not, how we design the code to get the values from the structure KOMV for the field KWERT for different steps to calculate and update in the rpicing procedure?
    Can u please guide me.

    and display it as the condition price for step 3 which has no condition type
    In SD, unless you have a condition type, you cannot show it as a pricing since it has an impact in FI via Account Key and G/L Account assignments.  Please explain more about the Business Process and how you want to capture.  Dont go for VOFM and all when the process can be configured via standard.
    G. Lakshmipathi

  • What is the meaning of this column in the pricing  procedure?

    Dear Gurus,
    What is the meaning of this column in the pricing procedure?
    thanks..

    subtotal field : Subtotal field is used to pass the value to some other field in PO .
    for ex: using value 9 you pass the value to field komp-brtwr. so that this can be used in  any other routine in the pricing procedure.
    requirement field: if there is a scenario that condition type should come in pricing on some condition like vendor country is india. in that case use create the requirment and attached this requirement.in this requirment you put logic and set the sy-subrc value 4 or 0.

  • I followed the same procedure of reverse calculation from MRP pricing calcu

    hi,
    sap gurus,
    i followed the same procedure of mrp calculation but
    MRP Pricing Procedure:
    Go through the following:
    I will brief your requirement in short
    MRP = 1012.5/-
    VAT = (1012.5/1.125) = 900/-
    so price before discount will be = 900/-
    discount given at the rate of 10% = 100/-
    Initial Price = 1000/-.
    1. Create condition types as below:
    ZR00 for price
    Condition class = B
    Calculation type = C
    Plus/minus = A
    ZSET for settlement (to knock off the effect of ZR00)
    Condition class = A
    Calculation type = C
    Plus/minus = X
    ZWST for tax
    Condition class = A
    Calculation type = H
    Condition category = D
    Plus/minus = X
    Z007 for discount
    Condition class = A
    Calculation type = H
    Plus/minus = A
    ZDUM for net price
    Condition class = A
    Calculation type = A
    Plus/minus = A
    YWST for tax (to knock of the previous effect - to be used for posting to G/L)
    Condition class = A
    Calculation type = A
    Plus/minus = X
    YOO7 for discount (to knock of the previous effect - to be used for posting to G/L)
    Condition class = A
    Calculation type = A
    Plus/minus = X
    2. The following will be the pricing procedure configuration:
    Step......No........Cond Type........... From.........to..........Man.........Req........Sta................Acc Key
    10........0..............ZR00..................--..........--..........-...........-........---.................ZDU
    20........0..............ZWST..................10............19...........----.............X............X...................
    30........0.............text.......................10...........29...........---...........----.........X
    40........0.............Z007.....................30...........39...........-----.............X............X
    50........0..............text.....................30............49...........---...........-----.........X
    60........0............ZSET.....................10...........19...........----............X............--.................ZDU
    70........0............ZDUM....................50...........59...........----............X............---...............ERL
    80........0............Y007.....................40...........49...........----.............X...........---...............ERS
    90.......0..............YWST..................20...........29...........-----............X...........---................ZWS
    ZDU - dummy account key for posting extra not required items.
    ERL - account key for price
    ERS - account key for discount
    ZWS - account key for tax.
    3. Condition records in VK11
    Condition type----
    Condition record.......
    ZR00........................................1012.5.....................INR will be positive (1012.50 +)
    ZSET.......................................100%...............................will be negative (100 -)
    ZWST.......................................10%................................will be negative (10% -)
    Z007.........................................12.5%.............................will be positive (12.50 +)
    ZDUM.......................................100%..............................will be positive (100% +)
    Y007.........................................100%.............................will be negative (100% -)
    YWST.......................................100%.............................will be negative (100% -)
    Condition records for Z007 & ZWST will be decided as per the conversion required. You will first have to manually calculate the amount for the condition type.
    4. I create a sales order for single quantity for an item & the pricing will be as under:
    ZR00 = 1012.5 (dummy account) - positive
    ZSET = 1012.5- (dummy account) - negative will knock off effect of ZR00
    ZWST = 112.5- (negative & no posting)
    Z007 = 100 (positive & no posting)
    ZDUM = 1012.5 (positive & posting)
    Y007 = 100-(negative & posting)
    YWST = 112.5 (positive & posting)
    but its not throwing any condition records for ZWST and YWST
    can any body help me
    plz
    regrds,
    balaji.t

    HI,
    Plz try Routin for Vat formula.
    i am worked on MRP pricing but in our case formula is different.
    eg.: If i want to calculate VAT for B=1000 Rs. it is like
    A=1000 * ((100/100 + (12.5- VAT 5)))
    = 889
    VAT (Value) = B - A = 1000-889 = 111 which is passed to GL account.
    For that we developed one Routine with the help of ABAP and assign to Pricing Procedure.
    Regards,
    PM

  • To make the Pricing Condition types inactive in Pricing Procedure

    Hi Experts,
    I am facing a senario where, in a sales order, pricing procedure, if one of the pricing condition type does not exist, then two other condition types (even though they are determined by condition records), should be either made inactive or should not appear in the pricing procedure.
    Example: If I have 3 condition types in Pricing Proc say
    YYY1, YYY2, YYY3, then the scenarios are
    a. If one of the condition types YYY1 is not determined, then, YYY2 and YYY3 should not be either determined in the sales order or should be made inactive. This same logic applies to both YYY2 and YYY3.
    b. If all three condition types are determined in Pricing Proc of the sales order, then, the price should be considered.
    If it was just YYY1 then, I could have done it in VOFM by writing a routine and assigning it to YYY2 and YYY3 in pricing proc. However, the scenario is to check the other condition types as well and make YYY1 inactive if any of the other condition type does not exist. Both condition types are determined after YYY1 which is another difficulty.
    I tried creating a dummy condition type  and assigning it to Pricing Proc (at the end of Pricing Proc). For this dummy condition I put in a pricing requirement which checks for all three condition types and if one does not exist, then it make other conitions inactive.
    However, this does not work in VA02 and VA03 as XKOMV is either not getting filled up or even if is getting filled, it is not having the condition type. It some times has condition records, and sometimes not... (not very sure why)
    So, I was thinking of using user exit for the same. However, I was unable to find a suitable user exit for the same where KONV table can be read or XKOMV can be filled.
    Can you please suggest if any user exit can be used for this or if we can implement it in a different way?
    Regards,
    Mukund S

    Hi,
    I think you can use condition exclusion functionality to select best pricing condition from a set of conditions in pricing.  You can compare conditions in many ways.
    I believe you can plot a solution with little research.  The below link is for your reference.
    [http://help.sap.com/saphelp_40b/helpdata/fr/93/743483546011d1a7020000e829fd11/content.htm]

  • Value to be minused in the Pricing Procedure

    Dear All,
    I want to minus one value from the total value.
    Scenario as follows:
    Step 10 - ZPRO - Item Price
    Step 20 - ZFOC - Additional Cost
    Step 30 - Assessable Value = ZPRO + ZFOC
    Step 40 - ZVAT - Sales tax on Step 30
    Step 50 - Total Value = Step 30 + 40
    Step 60 - Final Value = Step 50 - Step 20
    How to calculate Step 60?
    Rgds,
    Senni.B

    Dear Senni
    If you  need the particular condition type to be substracted in pricing procedure, mark the condition type negative in control data of condition type.
    Here your requirement, you create a conditon type with negative sign in control data & create a routine  saying that the exact value of what maintained in ur additional cost condition type shud be maintained in this new condition type too.
    Anyway is  this requirement a real time one?
    Regards
    Deepu Pillai

  • Invoice pricing procedure not using alt calc type from the pricing procedur

    The sales order has the same pricing procedure as the invoice but when the invoice is created it is not using the alt calc type that is on the pricing procured like it is on the sales order.  This is causing one of the condition types to have different values on the sales order vs. invoice.
    I am not sure what other areas to check to see why this is happening.  Any thoughts?

    I have checked and in the copy controls for Delv type = LF  and target Bill type = F2  the Pricing Type = G (copy pricing elements unchanged and redetermine taxes).   Condition types such as ZPR2 where there is condition record copy in correctly to the invoice.   It is condition type ZZIF where it is determined from a routine, not a condition record, where I am having this issue.
    Is there another place in config that I should be making a setting so that condition types determined by routines are copied to the invoice without being redetermined at invoice create?

  • About the pricing procedure of purchasing order

    Hello friends,
    can anyone tell me about the pricing procedure,conditions & texation of Purchase order?
    and hoew to maintain all those term in Customisation?

    The Basic thing is Condition Technique. In which there are 
    1. Access Sequence 2. Condition Record 3. Condition Type 4. Condition Table. 
    A Access Sequence access a Condition Record of a Condition Type in a Condition Table is a  Condition Technique.This is a simple logic 
    Here the Condition Type is very important like PB00, PBXX,RA01 etc. 
    In the background every Condition Type has its own defition means the purpose of the Condition Type  like, is it for Pricing or Percentage, Quntity base, Accrual Feilds etc is to be defined to work this functions.  Normally we use the existing ones without any risk. But some cases, we have to Create a New Condition Types as per the organisation requirement. 
    The Pricing Schema is useful to minimise condition types while mention prices for Vendor on the basis of Pricing Schema which we defined according to organisation requirement. 
    The Pricing Schema means the calculations procedure of Condition Type. 
    Ex.  RA01 - Discoount % is caclulated on PB00 - Gross Price  means 
    RA01 is based on PB00  like that we have to define in the Pricing Schema 
    which makes easy to use in real time. 
    Here PB00 has the Access Sequence - 0002. 
    But RA01 does not have the Access Sequence.Why because it is a dependent on PB00. But both are Condition Types. 
    In the system, by default some standard  Scheme will be there at Vendor Schema Group in the Vendor Master Screen means the standard one is assigned which is very lengthy which may fullfil our requirement. But some cases which may not fullfil our requirement, in such we have to define. 
    For the configuration, I may not able to explain properly through here but will give some idea. 
    Configuration: SPRO - IMG - Material Management - Purchasing - Conditions - Define Price Deternmination Process:
    1. Define Access Sequence 
    2. Define Condition Type 
    3. Defince Calculation Schema:- Here you have to define the Schema - Define Schema group 
    1. Define Schema Group vendor 
    2. Define Pricing Schema group 
    3.  Schema group for Purchase Organisation 
    4. Assign Schema group to Purchase Organisation - Define Schema determination 
    1.define calculation schema for Standard purchase organisation 
    After completion of the Schema Group, we have to assign it to Vendors. 
    Then whenever we use any transaction with this Vendor, the concerned  Schema will work as configured by us. 
    The Pricing in MM is vast because each Condition have its own importance and each Access Sequence have its own importance. So you need not bother about this. First you learn how to define the Calculation Schema through the above.

  • How to hide the pricing conditions specified in pricing procedure of sd.

    dear friends,
    my situation is to hide the conditions specified in the pricing procedure. so that it is not viewed by the some users.can you please tell me how to hide the conditions. so some of the persons, who are having authorization to see the conditions , will be able to see the pricing conditions.
    can you please suggest me how to do this.
    regards,
    g.v.shivakkumar

    Authorisation  issues viz. Role Impementations
    Hide Condition Records Line Item & Header Wise from all the transactions QK / So /  P.I. / Enquiry / Invoice etc. for specific user grps. - in CRETATE / AMEND / DISPLAY / REPORTS all
    Only Display the fields
    regards,
    g.v.shivakkumar

  • Excise duty in the Pricing Procedure for Local Purchase / Importation

    Hi,
    I'd like to know how to set up the pricing procedure for the purchase of an IS Oil Material; for local purchase and importation, especially with regards to the excise duty posting.
    Local purchase:  the vendor will bill us inclusive of the ED tax he previously paid, so the tax is just passed on to us..  My receiving location has ED paid status. In the PO item, we need to see this price (inclusive of tax) in the net price field.
    Importation:  the vendor only bills us the cost of the material.  When we received the fuel, we paid ED tax to local tax authorities.
    I know that both in these scenarios, the system has to determine the excise duty.
    My questions are (1) how do you set up the excise duty condition type  in the pricing procedure(or do they have to be maintained in the pricing procedure?) ?   and (2)  how do you set up this condition type in the config?
    Thank you and hoping for your immediate feedback.
    zccr

    Hi,
    You can use same pricing procedure
    put 4 in subtotal in pricing procedure against the Discounr or freight cond
    and in taxinn
    BASb ALTCBV 362 and for jmop 363
    But this will work only if same  discount or freight value is in IV as that given in PO
    if freing value changes in IV then its a problem
    This is SAP bug, and SAP workes in that way only, freight value should be same in PO and IV
    other solution
    in taxinn create tax code like v8 vat 4% for 003 tax clasification
    in ftxp create tax code V8 desc vat 4%
    in fv11 for jvrd put 4
    and at the time of IV put this tax code for freight amount
    and for regular material value V1 tax code
    this will work only if u have used acess seq MWST instead of JTAX pr JST1
    hope this helps
    Vipin

  • The pricing procedure in Sales order is not getting copied into invoice

    The pricing procedure in Sales order is not getting copied into invoice.
    I have created a document type (pricing procedure),based on the document type ,pricing procedure determination is done.
    So while creating sales order the pricing procedure is determined but when invoice is created the pricing doesnt refelect in the invoice.How to over come this problem

    Hi
    Please check the in OVKK, weather you have maintained correctly or not.Also check in the Billing document type details what is the Document pricing procedure that has been maintained.
    Regards
    Srinath

  • Condition Type  not displaying on the pricing procedure

    Hello We are copying a sales order contract with reference to a sales order but we want a condition on the contract pricing procedure to be determined. Now I know I could redetermine pricing by selecting these option but we can't do that as there could be  a year difference so we need the old pricing. B    Carry out new pricing C    Copy manual pricing elements and redetermine the others e.g. Sales Order  Pricing Procedure XXXX                         Conditions ZPR0                          Conditions ZHD1 Create Contract with reference to sales order    Contract  Pricing Procedure yyyyy                         Conditions ZPR0                          Conditions ZHD1                         Conditions ZNEW In the analysis the condition ZNEW has the "Condition without condition record (not relevant)" As I mention in new pricing it appears   

    Hi Roy,
    Trust you are doing good,
    I have gone through the question which you have asked but its not clear what do you want to exactly do.
    Pricing Procedure XXXX                         Conditions ZPR0                          Conditions ZHD1 Create Contract with reference to sales order    Contract  Pricing Procedure yyyyy                         Conditions
    Here you talking about two different pricing procedures..or you talking in terms of pricing values.
    Please highlight.
    Thank you,
    Regards
    SRT

  • Rebate fixed amount condition in the pricing procedure

    Hi SD Gurus,
    i'm using rebate fixed amount conditions (Lum sum).
    The situation from a business point o f view is the following: i pay the customer 1000$ once he made something.
    This kind of condition is not relevant for accruals since they have to be built manually (manual accrual). As a consequence i'm note sure if this condition shoul be put in the pricing procedure used for invoices. In the other and for sure this condition should be inserted in the pricing procedure for manual accrual/credit note.
    What is your point of view!!
    Thanks
    C

    if you are going to use Rebate, then there is no need to add condition type in standard pricing procedure, if you have designed your pricing procedure, include condition types for rebates as in standard pricing procedure.
    This condition type is linked to Rebate type.
    I think you first try the scenario in IDES and then do the same settings as per yoru requirement.
    If you want step-by-step procedure for rebates will help you
    Please refere the thread
    rebate documentation
    Regards
    Jitesh

Maybe you are looking for