11-02-2010 9:56 AM
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
11-02-2010 10:03 AM
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.
11-02-2010 10:03 AM
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.
11-02-2010 1:55 PM
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.
11-03-2010 5:32 AM
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.
11-03-2010 5:33 AM