Skip to Content

Automatic Price update in sales order

Dear Experts,

When a user creates a sales order with suppose material 'A', the pricing is determined but then the user realizes the material needs to be changed and so they change the material in the order. Now, it shows prices have been redetermined but when in the item conditions page, they have to run the update button for updating the prices. The user wants that she does not have to do this manually and this change happen automatically before saving.

Kindly suggest a way so that after changing only the material, the prices get updated automatically without pressing the update button.

Thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

7 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2016 at 07:52 PM

    Hello,

    Try to check program MV45AFZB on the user exit:

    • USEREXIT_NEW_PRICING_VBAP

    Option for entry of preconditions for carrying out pricing again (e.g. changes made to a certain item field could be used as the precondition for pricing to be carried out again). Further information in MV45AFZB.


    Hope to have helped.


    Regards,

    Daniel Zambrini

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 29, 2016 at 02:15 PM

    Why don´t you add this "changed" material into a new line, so the pricing will be carried out for this material.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 08, 2016 at 04:23 AM

    HI Everyone!!

    Thanks for your help. The userexit modification as suggested by Daniel, worked. I maintained that if there is change in material, carry out a new pricing and it worked.

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 29, 2016 at 07:45 AM

    Have you tried hitting enter key in sale order after changing the material code?

    G. Lakshmipathi

    Add a comment
    10|10000 characters needed characters exceeded

    • Automatic pricing updation will happen if your copy control Pricing Type is set to "B". But here, you also need to take into consideration the fact that if you want to fetch a price from sale order and if your pricing condition record have a different price, then in that case, system will ONLY read the condition record and not the sale order price.

      G. Lakshmipathi

  • Posted on Jan 30, 2016 at 06:59 AM

    Is this the same behavior for everybody, including you, or only some of the users are affected?

    Does it occur for all order types? If you use ZOR as standard order in the company, check with OR/CS etc, try with document types that use different pricing procedures.

    Does it happen also with a single order item and even the base price condition is not updated?

    Could you please share some screenshots to illustrate the problem?

    VA01->enter material+quantity (get screenshot)->show conditions tab for the item (screenshot) and header (screenshot).

    Please do not add manual pricing conditions at header level.

    VA02->change the material (get screenshot), press enter, close the popup->show conditions tab for the item (screenshot) and for the header (screenshot).

    Then reprice with option B and show conditions tab for the item (screenshot) and the header (screenshot).

    What happens if you create an order with material A, change the item to material B, save, exit VA02, re-enter VA02 - do you see the correct prices? The reason for asking is because this could be some visual bug as a result of a custom development.

    If even after order save NETWR,CMPRE, MWSBP are not updated correctly (check VBAK and VBAP), then this is a very serious problem. Did you check your company's documentation on activated user exits, additional developments for SD?

    Add a comment
    10|10000 characters needed characters exceeded

    • Did you also try:

      What happens if you create an order with material A, change the item to material B, save, exit VA02, re-enter VA02 - do you see the correct prices? The reason for asking is because this could be some visual bug as a result of a custom development.

      From your screenshots I can see that this statistical condition is somehow tied to a non-statistical one, which influences NETWR, so if NETWR is not automatically updated after order save (without manual repricing), then this is indeed a very serious problem and can be abused by users.

      Check the setup in your pricing procedure, transaction PRCAT can also help you in the investigation.

      There is a functionality to postpone updates of header/group conditions during order entry to increase performance, but I think it was for CRM, not for ERP.

      Please, somebody correct me if I am wrong about that (I don't have system access with a recent EhP at the moment).

      I do not experience such behavior in my IDES sandbox (I don't have there custom logic related to pricing), so I still suspect some not very well thought out custom development. Check the VOFM routines, check the exits, ask a colleague developer to assist you if you are not comfortable with reading ABAP code.

  • Posted on Feb 04, 2016 at 05:21 AM

    Hi,

    While checking the pricing after updating the material, i noticed that the pricing elements shown are for the previous material itself:

    Updated material in SO:

    Pricing elements for previous material:

    I have also checked in the system and there is no custom development related to pricing. However, pricing routine '2' is maintained for ZPR0.

    Thanks


    1.JPG (11.7 kB)
    2.JPG (62.9 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 15, 2020 at 04:48 PM

    You will have to code in MV45AFZB include. The routine to use would be userexit_new_pricing_vbap.

    You need to compare *vbap-matnr with vbap-matnr.

    If there is a change pass new_pricing = B

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.