Price update in VF02

Dear Friends,
according to our requirement.
i need to update price in VF02
in the vf02 Condition tab there is a button call UPDATE
so i want to do this part by automatically i mean by coding
please if you have done this kind of thing please update me.
Thanks in advance

If you want to control pricing type (B or C etc) through configuration, you can do it in item category level copy control configuration in VTFA (If you are doing order related billing) and VTFL (if you are doing delivery related billing) in the field "Pricing type". This will work during invoice creation, when the invoice is getting copied from order or delivery
However if an invoice is already created and you want to reprice like you would do in VF02, you can do a BDC like below.
The below code does repricing on a sales order item, but you can record similar coding on VF02 also, using SHDB and tailor accordingly. We have this code working in our system where we reprice our contracts/orders using the same.
LOOP AT ft_item INTO ls_item.
* Item overview screen - Press the item position button
    PERFORM bdc_dynpro USING 'SAPMV45A'     '4001'.
    PERFORM bdc_field  USING 'BDC_OKCODE'   'POPO'.
    PERFORM bdc_field  USING 'BDC_CURSOR'   'RV45A-VBAP_SELKZ(01)'.
* Item position popup screen - Enter item number and press OK
    PERFORM bdc_dynpro USING 'SAPMV45A'     '0251'.
    PERFORM bdc_field  USING 'BDC_OKCODE'   'POSI'.
    PERFORM bdc_field  USING 'RV45A-POSNR'  ls_item-posnr.
* Item overview screen - Select item and press pricing button
    PERFORM bdc_dynpro USING 'SAPMV45A'     '4001'.
    PERFORM bdc_field  USING 'BDC_OKCODE'   'PKO1'.
    PERFORM bdc_field  USING 'BDC_CURSOR'   'VBAP-POSNR(01)'.
    PERFORM bdc_field  USING 'RV45A-VBAP_SELKZ(01)'  'X'.
* Item pricing screen - Press price "Update" button
    PERFORM bdc_dynpro USING 'SAPMV45A'     '5003'.
    PERFORM bdc_field  USING 'BDC_OKCODE'   'V69A_KONY'.
    PERFORM bdc_field  USING 'BDC_CURSOR'   'KOMV-KSCHL(01)'.
* Price update popup screen - Double click SAP B or C reprice type
    PERFORM bdc_dynpro USING 'SAPMSSY0'     '0120'.
    PERFORM bdc_field  USING 'BDC_OKCODE'   'PICK'.
    CASE ls_item-knprs.
* If B is requested in input, we do reprice B which
* will eliminate all manual repricing and bring back SAP item pricing
      WHEN 'B' OR 'D' OR 'M'.
      PERFORM bdc_field  USING 'BDC_CURSOR' '05/03'."05/03 = repricing B
* If C is requested, we do C repricing keeping manual conditions intact
      WHEN 'C'.
      PERFORM bdc_field  USING 'BDC_CURSOR' '06/03'."06/03 = repricing C
    ENDCASE.
* Item pricing screen - Go back to Item overview screen
    PERFORM bdc_dynpro USING 'SAPMV45A'     '5003'.
    PERFORM bdc_field  USING 'BDC_OKCODE'   'BACK'.
    PERFORM bdc_field  USING 'BDC_CURSOR'   'KOMV-KSCHL(01)'.
ENDLOOP.

Similar Messages

  • Not able to view actual Price updated 'Value' in Change Tracker

    I was able to get my Change tracker to work and it is functioning. (SRM 5.0 MDM5.5 )... Configured Portal iViews for change tracker.
    If I change a description I can see it in the change tracker application. But if I try and track a Price change it only shows me a date-time  and user as to I when the price was changed it doesnu2019t show me the actual value changed, for my audit purposes.
    On the portal the change tracker "Field" dropdown shows -> Price Updated. this is what is tracking any change of price.
    In MDM Console-> Admin->Change Tracker I am tracking under Catalog Items: Price information, Price Updated, Special search terms, long description.
    When I look at the Data manager in the Record Detail, I see  u2018Price Updatedu2019 and it only has a Date and time stamp. In this same Record Detail,  I see the field Price Information that contains :Lower bound, Purchasing Info record ID, Purchasing Organization, Amount and Currency.  Amount-> contains the actual price value. This is what i want to see in the portal iView as Old value and New value....this is what I am unable to view? theres one small step i am not doing...
    I am trying to track the actual change in the filed u2018Amountu2019u2026 I have tried to search for it in the Portal iView fields (table, record contains, fields, record)
    cheers
    alex

    Hi Alex,
    I would not here comment on change Tracking functionality but can you suggest another workaround to achieve this requirement. If it fits in your requirement you can go ahead with it.
    In MDM, Create another field in Main table say Initial Price and for already existing field Amount replace its name with Updated Price in Qualified table Price.
    now after this you will see that your by default Updated Price has values as it was your Amount field earlier and Initial Price field as empty. Now for next time, if any record comes using Import Manager then MDM workflow should trigger at Record Import.
    This workflow contains following steps.
    Start(Checkout)>Assign>Stop(CheckIn)
    Assign step should have below expression and assignment:
    Price Information.Updated Price
    Where I am assuming Price Information is the field in main table which is look up to this qualified table Price.
    So in this way you can maintain both existing and updated values of Price and cant then show in your Catalog.
    suppose you have already existing record say 1 which has value of Amount as 20.
    So that means you have Updated Price as 20 and Initial Price as empty(Null)
    Now when same record 1 updates with new Amount say 40, it triggers this workflow on record import which will then assign value of existing updated Price 20 to Initial Field after that Updated Price will update by 40.
    Note: This Assignment works well only if your main table record has this Qualified table link as single record. If your main table record contains more than one qualified links then this Assignment would not work fine. So use only if it fits.
    Regards,
    Mandeep Saini

  • Price update in Scheduling Agreement

    Dear Gurus,
    I am seeking valuable suggestions reg the price update in scheduling agreement.
    I am aware of the fact the the same can be done in the below mentioned ways-
    1) Manually
    2) Through condition records
    I would be seeking the best possible option to the update the price in scheduling agreements, options would be
    1) Manually @ item level
    2) Changing condition records ( VK12) with same validity period
    3) Changing condition records ( Vk12) with new validity period ( closing the old validity period)
    This is because to avoid any inconsistency in the future.
    Regards,
    Ajit

    Dear Ajit,
    1.Manual entry -
    Manual entry will be applicable in only some cases and you cant able to track if some one has changed the price and it is having limitation .
    2.through condition records-
    where as if you maintain the price through the access sequence and user cant able to change the price manually and for different combination and different material you can maintain different prices .here there is no limitation and you can extend this price for different combination in future .
    Based on the above points you take decision.
    Regards,
    C.B Reddy

  • PR Price update incorrectly with SO Price

    Hi All,
      I am working on a weird issue. Please help me.
    1.     SO price change will reflect in PR valuation price that working fine. But if I change the price of only one item like only for item no 1o and don't touch any other item.  In this case the SO item 10 price update to all PR item 10, 20, etc.
    2.     If I change price of item 10 and take a look at price(via item details->Schedule line->Purchase req) of 10,20 and 30 then the price updated to all PR item correctly.
    Please help me to resolve the issue.
    Regards
    Swati..

    Solved. Issue with an enhancement point added incorrectly.

  • Stop price update of  delivered but un-invoiced (non-invoiced) line items

    Hi Gurus,
    I need some help regarding price update of line items which are delivered but not invoiced yet.
    Case 1:
    I am calling the FM 'BAPI_SALESORDER_CHANGE' and passing the line item (say 10) whose price needs to be updated. This line item is neither delivered nor invoiced. Result, correct change of price for line item 10.
    Case 2:
    In the above order, i am adding another line item (say 30), which is completely delivered, but I have not yet created an invoice for it. I want that this line item's price should not be changed (as delivery is already created for it). So, in my price update report, I check and filter this line item (10) and pass only line item 30 to the BAPI. Result: not only line item 30 but line item 10 also gets updated with new price!!
    Case 3:
    I created a new line item(40) and created an invoice for it after completely delivering it. When I call the BAPI now, I again filter the line items 30 and 40 and pass only line item 10 which i want to be updated.
    Result:
    Line item 10 - updated with new price
    Line item 30 - updated with new price
    Line item 40 - not updated
    Requirement:
    Any line item that is completely delivered should not be updated with the new price regardless of it having an invoice or not.
    Assumptions:
    I am running a custom report to find the line items that need change and calling the BAPI_SALESORDER_CHANGE and passing those line items to update the price.
    Problem faced:
    This process is updating all line items in the SO that are not invoiced regardless of weather I am passing it to the BAPI or not
    As far as i know, the checking of the invoice is in some standard program, and hence had debugged the BAPI and got the FM SD_SALES_DOCUMENT_SAVE which in my opinion is doing the change. But on further debugging I lost track of the tables which were holding the data as the code is flowing through a number of user exits and standard forms.
    Please help!

    Hi Soumyo,
    In Pricing Update screen, you will find pricing type X, Y and Z which you can use to define your own pricing update scenarios.  Check OSS note 24832. This note provides enough details about each of the update pricing options and also explains on how to use pricing update X, Y, and Z.  Let me know if you need any more help on this.
    Thanks & Regards
    Kapil Sharma
    Author - Configuring SAP ERP Sales and Distribution

  • Price Update on new purchase order in ME21N

    We are creating new purchase orders for year 2011 and wanted to do mass update of price in the conditions tab.  It works only when we select each line item.  But if we select all and then hit price update with choice 'B', only the first line is being changed with the new price.   Is there any inconsistency in updating the price - we are copying a previous year's purchase order to create a new PO.  Thank you for your help.
    Chandra

    Hi Chandra,
    I think what you are looking for is the functionality called "Automatic document adjustment". Please take a look at [http://help.sap.com/erp2005_ehp_02/helpdata/en/75/ee1fa755c811d189900000e8322d00/frameset.htm]. There select Conditions ... -> Automatic Document Adjustment.
    BR
    Raf

  • Price Condition&Price update are disabled in S.O even after partial invoice

    Dear All,
    We are using manual pricing condition in the Sales Order, when we do a partial delivery and billing for a Sales Order line item, the update prices function (button) is inactive and price conditions are greyed out.
    We are using Pricing Type "C" in the VTFL item copy from Delivery to Billing.
    Even after partial quantity invoicing from the Sales Order there will be pricing changes and users will need to enter manual price for the item that is partially invoiced.
    Currently system does not allow any change in the manual price condition as the all the price conditions are greyed out in the S.O even if partial qty of the line item is invoiced.
    Please let me know what needs to be done to enable manual condition entry and Price update functions in the Sales order even after partial invoice quantity of the line item in the Sales Order.
    Regards
    Venkat

    Hai Venkat,
    This is the standard functionality and system treat like
    sales order conditions once invoiced should be freezed.
    As a work around you can do like
    in sales order order
    Go to Item - Shipping
    Part.dlv./item     B      Create only one delivery (also with quantity = 0)
    Max.Part.Deliv.  1     
    This make only one delivery for the line item
    Considering if you have a material Sales order of 2 KG and you added some manual price.
    And you are doing partial delivery of 1 KG and Invoiced.
    Now user can use the same sales order and create a new line item of the same material and can enter the balance qty and change the condition which is not grayed out.
    Regards,
    Mani

  • Price update from Original Material to copied Material Master

    I have a scenario,
    We are selling Raw materials to outside companies who have shortage of materials on Loan Basis. Once they have materials, they will return the materials within a time period. If they don't have the materials and unable to return within the said time, they will make the payment.
    We will follow the normal sales process to sell the item to the customer.
    1. creating sales order,
    2. Outbound Delivery, and
    3. Billing
    Return process when receiving the materials from the company.
    1. Billing Cancellation
    2. PGI Cancellation
    Since this is not an actual sale, hence we need to maintain selling price same as the purchase price.
    We are planning to extend the Raw Materials to Sales View in the material master. However, we came to know that this will be Violation of Act. Hence we are planning to create a new material by copying the existing Raw Material master but the Material type will be Issue on Loan. This material will have sales view and purchase view.
    This material will have a separate Valuation Class. Price control indicator will be V, since the item should be valuated at Purchase Price and the purchase price will keep changing as and when the price changes. This moving average price will be used as selling price.
    The same price needs to be updated in the Sales Order automatically from the Loan Material Master when selling the Loan Material.
    Now, the problem we are facing is, if we create a new Loan Material by copying Raw Material master with ROH material type, how will the price update in New Loan Material since, we will not purchase the Loan Material. We are purchasing the original item as raw material. Hence, this will not update the Loan Material Price automatically and the price will remain unchanged.
    Please suggest a work around?

    Hi,
    Let me explain to you how I am proceeding.
    Step 1:
    Create new material master by copying existing Raw Material with Issue on Loan material type. I am assigning a new Valuation Class in this material master. Also, we keep the pricing
    Step 2:
    Transfer stock from old material to new material in MB1B with movement type 309.
    Step 3: Issue of Loan Material to Customer on loan basis.
    Creating Sales Order, PGI and Billing
    Step 4: Receipt of Item back from Customer
    Sales Return process.
    Step 5: In case Customer does not return goods, then we will collect payment from them
    In the entire process we need to maintain the selling price at purchase price of the original material. Can you suggest any work around, in case this process is not advisable.

  • PO Price update at Header Level

    Hi Friends,
    Our PO Price "Update" button at header was grayed out and only able to do at item level??
    Actually we have a "Post dated" PO and the tax rate was changed now. So, we need to update the tax rate. To update at item level for each and every item is cumbusome.
    Is there any way to update at header level. Or is there any way to update in MASS??
    Or is there any program available to carry out pricing for a bunch of PO's??
    Any valuable reply will be appreciated.
    Regards,
    Dev

    Hi,
    Since the condition type which you are using for taxes are configured to be entered at item level and changes can be made only at item level.
    If you want to update it at header level and the condition type is applicable for all the line item in PO, please change in configuartion so that u can make changes at header level.
    Path SPRO-> MM->Purchasing-> Conditions-> Define price determination process->Define conditon types . For particular condition type which u want to make changes at header level. Thr is a option changes which can be made. Click on check box for header condition.
    Please see that it is config changes and it will get updated wherever this condition type is used.
    Reply if u have any issues still.
    Thanks,
    Ravi

  • Material Price updation through Material Ledger

    Hi,
    I implemented the ML and after executing the ML Costing run & on 1st movement of material( Dynamic price release) the The Per Unit price* which is calculated in ML costing run is not updating in the current std price area in Costing View 2 Tab.
    I think the previous periods( for which I did ML Costing Run)  Per unit price has to update in the Current planned price in Costing View 2. Instead of this , the std planned price of previous period only updating in the "future Planned price".
    Please explain how to get the Previous period Moving price in Current Planned price in Costing View 2.
    T & R,
    C.Balaji

    Hi,
    I did CK11N & CK24 in Feb for example, and the price updated in current std cost estimate.
    after month end closing I did CKMLCP,  I heard that after completing all the sequence of oparations, The actual cost incurred for the material will update in Perunit price and Price controle will become from S to V, and we can get the Moving avarage price of Feb will become the Std price for the March month.
    This is not happening , How we can get this Moving Avarage price of Feb month as a Std current price in March month.
    Pls inform wether it is possible or not, if possible what is the method to get.
    T & R,
    C.Balaji

  • User Defined Field that gives the date output of the last price update.

    We would like to create a User Defined Field (UDF) with a Formatted Search (FMS) on the Item Master form that gives the date output of the last price update specifically the wholesale price.
    Last Price Update
    Pricelist 2 = Wholesale
    Is this feasible?
    If it is feasible what is the recommended approach?
    Current working UDF on Item Master.
    /* Date output is based on all the latest updates on the Item Master.*/
    select max(updatedate)
    from aitm
    where itemcode = $[oitm.itemcode]
    Resources that were helpful.
    1.(Note:1165947 - Tracking Item Price Changes.)
    2. Case 4-I6: Query on price updates. Mastering SQL Queries for SAP Business One By: Gordon Du

    Thank you Gordon,
    We are looking for the date output of the 'Last Price Update' based on 'Pricelist 2 = Wholesale' which is the challenge.
    These 2 are the parameters for the date output, I should have mentioned that in my original message.
    Last Price Update
    Pricelist 2 = Wholesale
    Per reading a bunch of other similar Forum Questions it looked like it is might not be possible to do. With there being no date on the AIT1 table and AITM.Updatedate is based on any and all updates not just last 'Last Price Update' and not sure how to use the loginstanc.
    Thanks,
    Vern

  • Contracts - Service master price update

    Hi All,
    There was requirement in which the contract service master prices were required to be changed.
    To update new condition price in the condition records, we created a program to update these values using ML52.
    Eg. Contract A - item 10- Service S - old price - 100 - Valid till yesterday
                                             new price - 200 valid from today
    We have a few problems here
    1) Contract A always show old price even though valid price for this service today is 200 for the service S.
    Is there any standard program which will correct this contract and get the new price seen in the contract based on the valid date. I.e. the service prices in the contract should always reflect the valid condition record price from ML52.
    2) While updating ML52 there were two kinds of records. One with Plant specific and others without plant. Now when I go to contract, select services and select a service line item and click on the new condition record which is valid today and come back. If the condition record is plant specific, the new price 200 is immidiately seen on the contract service master screen. But if the ML52 value was not plant specific, it always shows me 100. What could be the reason for this.
    I have tried to give as much details as I can. Let me know incase any more information is required.
    Regards,
    Shahu

    Hi,
    Certain condition types can be changed via mass maintenance (transaction MEDL) in a contract, the conditions in all                   
    selected documents are correctly changed. However, even if you display                     
    one of those contracts, the values on item level are NOT updated at all!                   
    This only happens when a MANUAL start of the price determination                           
    occurs, it is NOT performed automatically!
    Nevertheless, the user can be SURE that correct príces are found by the system whenever such a  contract service is selected, no matter what is written in that contract                                        
    itself!                                                                               
    If prices are entered into a contract with different validity periods,             
    the system does not update them automatically, but one has to use the pulldown menu option                
    'prices -> find new' after having selected one item line and switched              
    to the service fullscreen. If you want to update the service      
    contract with latest price then you have to use the following:           
    Me32K->item services->service conditions here goto menu                  
    service specipications -> prices-> find New. Then system updates the      
    price with the current validy date price. In already existing contracts you must carry out a new pricing manually.                               
    Please test additionally the batch input process for price updation in contracts - transaction SHDB.
    I can not answer your question regarding the update of non plant specific data. Sorry.
    Regards,
    Edit

  • Material Standard Price update.

    I've been trying to update a material standard price via BAPI_MATERIAL_SAVEDATA or MY_MATERIAL_PRICE_UPDATE, with no success.
    I've followed the example code give in the thread /message/9187089#9187089 [original link is broken].
    Has anyone gotten this to work?

    Sure.
    Costing Type (OKKI) : 01 Standard Cost estimate (material), in this Price update: Standard price & Valuation View: Legal valuation.
    Valuation variant components:
    001: Planned valuation Materials: priority 1. Price frm purchasing info records, 2. Valuation price according to price control in material master 3.Valuation price with user Exit.
    007: Production Order Actual: priority 1. Valuation price according to price control in material master.
    Edited by: KMadhumati on Aug 12, 2009 9:44 AM

  • Reversal of Cost Price Update and Price Change MR21

    Dear SAP experts
    Recently (on 1st of this month) i did cost price update for all my FIG items. Later i realized that some of FG items cost price was not accurate. So i want to delete cost price of those items and update price by using T code MR 21 
    When i try to cancel these items cost price by using T code CKR1, i am getting error message that particular material current or future standard price is avialable and i am unable to move further
    Please guide how to delete current cost price of these items and update cost price by using MR21. Please note these items does not have any BOM and basically are contract manufacturing items
    Thanks in advance

    Hi Vedsai
    When you use CKR1, it does not give error.. It just gives a warning message
    Enter your Plant / Mat in CKr1 and select "Current cost estimate" or "Future Cost Estimate" as the case may be
    If any warning comes, ignore it and press enter.... It should reverse the cost estimate
    Now update from MR21 or preferably use CK11N again
    Note: If at all it gives any error in CKR1, check in T code OPR4_CK if this msg can be converted into warning message
    Regards
    Ajay M

  • Standard cost price update

    Can anybody tell me in details the logic behind the standard cost price update.
    Regards
    Amitava

    Hi.
    1.After did the cost estimate in ck11n . you need to update the cost for the current period. then only it will update in the MM02 under the costing view.
    2.In the update the costing , 2 steps need to do
    a. MARK the costing . give the period for which you need to mark the costing. and execute in ck24
    if you done . the price will update for the future period . you can see this in the MM02 under costing view / std costs
    It means thats you do calculate and mark the cost but it will show in the future period in MM02 COSTING VIEW. . but you are not release this cost as the current period cost. so you are still in the old period costing only.
    b. RELEASE the costing in ck24 itself. If you release the costing , then the costing will be show in the current period in mm02.

Maybe you are looking for