Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Pricing not happening properly when UOM is changed

Former Member
0 Kudos

Hi All,

My requirement is as follows:

For a material 999999 say 1 Carton = 25 PC. When user enters 24 PC while creating sales order since it is less than 25 PC or 1 Carton, I need to change the quantity to 1 Carton. When I change it to 1 Carton pricing is happening only for 1 PC and not 1 Carton.

However if I change it to 25 PC ( which is also 1 Carton) pricing is happening perfectly.

But the requirement is to change the UOM to Carton if less than 25 PC are entered.

I have tried in the following userexits:

SAVE_DOCUMENT_PREPARE

MOVE_FIELD_TO_VBAP

USEREXIT_NEW_PRICING_VBAP

Also I have tried using the

PERFORM preisfindung_gesamt USING 'B'

.in SAVE_DOCUMENT_PREPARE.

Still pricing is not heppening properly.

All I want is to have proper pricing after changing the UOM.

Thanks in advance for your help

Aravind

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

In Standard, if the UOM and the alternate UOM is maintained in material master then the calculation for pricing will happen perfectly in Sales Order, you try creating the sales order once again by deactivating the user exits and any other custum developed codings that you have made for sales order.

Check in your coding, are you passing the UOM too..

Regards

GK.

4 REPLIES 4

Former Member
0 Kudos

Hi,

In Standard, if the UOM and the alternate UOM is maintained in material master then the calculation for pricing will happen perfectly in Sales Order, you try creating the sales order once again by deactivating the user exits and any other custum developed codings that you have made for sales order.

Check in your coding, are you passing the UOM too..

Regards

GK.

brad_bohn
Active Contributor
0 Kudos

OK, as I've often said here, never ever change anything that affects pricing (or any other critical document process) in the save user exits. Next, it's difficult to answer without knowing the entire requirements, e.g., is this a floor requirement (never less than a carton) or a rounding requirement (always to the nearest carton), do you always price in cartons, etc., and how you materials are configured (base units, sales units, etc.). For rounding, you should generally be using rounding profiles for this type of action, and they will take care of this. There is a simulator in the IMG that will allow you to test your config. If you can't use rounding profiles for some reason, you should use the MOVE_FIELD_TO_VBEP exit to change the quantity and units in conjunction with MOVE_FIELD_TO_VBAP. You should not need to trigger the new pricing exit; it should take care of itself.

Former Member
0 Kudos

Thanks Gnana and Brad for your replies.

The issue is solved.

We need to modify following fields from XVBAP as follows.

             xvbap-kwmeng = target value            
             xvbap-lsmeng = Target Value.
             xvbap-kbmeng = xvbap-kwmeng.
             xvbap-klmeng = mara-umrez / mara-umren
             xvbap-vrkme = Target UOM
             xvbap-meins = Base UOM
             xvbap-kmein = Base UOM
             xvbap-zieme = Target UOM
             xvbap-umziz = marm-umrez.
             xvbap-umzin = marm-umren.
             xvbap-umvkz = marm-umrez.
             xvbap-umvkn = marm-umren.

Similarly fields needs to be changed in XVBEP structure

Previously I did not fill the umkvz and umvkn so proper pricing did not take place.

Former Member
0 Kudos

issue solved by myself