07-14-2009 11:04 PM
Hi all,
I have a routine 993 in sales order which is in Column 'Bas Type' in pricing procedure . The routine has statement like this that calculate the unit price:
If xkomv-kbetr is initial.
xkomv-kbetr = komp-netwr / kmeng
Endif.
This calculate the net price which appear in the column 'Amount/Net Price. In the order, the user can change the net price in column 'amount'. However, if i remove the line "If xkomv-kbetr is initial", the user can change the amount, but the amount value will stay as the original amount. I don;t understand why this happen. I have been debugging saplv61A (FM Pricing) but unable to get the flow. Can anyone pls provide guidance ?
Thanks
Joyce
07-15-2009 1:59 PM
Hi Chan,
If you remove the IF condition from your code then it will surely overwrite the value that the user will manually enter in the
sales order. What i would suggest is try changing the condition as if xkomv-kbetr eq 0.
Also make sure you are not over-writing the field somewhere else in your code.
Regards,
Premal
07-14-2009 11:08 PM
Hi all,
I have a routine 993 in sales order which is in Column 'Bas Type' in pricing procedure (vofm/formula/cond base value). The routine has statement like this that calculate the unit price:
If xkomv-kbetr is initial.
xkomv-kbetr = komp-netwr / kmeng
Endif.
This calculate the net price which appear in the column 'Amount/Net Price' (kbetr). In the order, the user can change the net price in column 'amount'. However, if i remove the line "If xkomv-kbetr is initial", the user can change the amount, but the amount value will stay as the original amount. I don;t understand why this happen. I have been debugging saplv61A (FM Pricing) but unable to get the flow. Can anyone pls provide guidance ?
Thanks
Joyce
07-15-2009 1:49 PM
Dear Joyce,
Do like shown belo:
IF KOMP-MGAME NE 0 .
XKOMV-KWERT = FORMULA.
XKOMV-KAWRT = FORMULA.
ENDIF.
YKMEIN = KOMP-KMEIN .
Try this, I hope, this works, as XKWERT is the field used for amount.
Regds,
Anil
07-15-2009 4:48 PM
07-15-2009 6:03 AM
Hi Joyce,
From what i gather, the amount field is not changed as it is calculated from the netprice divided by the quanity.
so even if you have removed the initial check it does not make a difference as the amount = netpr / qty. The netpr is fixed based on your priciing conditions.the only value you can change with the current configuration is the qty and then your amount will change.
So if you need to have the user manually enter an amount,you will need to check your pricing conditions and have a manual condition defined for this particular line item type so the system will not apply the pre-defined net price from the pricing conditions.
Hope this helps.
Regards,
Neil.
07-15-2009 1:36 PM
Hi Neil,
With our current configuration now, we can change the amount (net price) at line item level manually after the line item is created. We can also change the quantity. We have a manual entry selected for this condition type. Currently we define the condition type as: cond class = B, cond type = c, cond cat = H, manual entry = C.
Do you mean i need to create another condition type ?
Would changing the code in sapmv45a or saplv61a be able to help ?
Many thanks
Joyce
07-15-2009 1:59 PM
Hi Chan,
If you remove the IF condition from your code then it will surely overwrite the value that the user will manually enter in the
sales order. What i would suggest is try changing the condition as if xkomv-kbetr eq 0.
Also make sure you are not over-writing the field somewhere else in your code.
Regards,
Premal
07-15-2009 4:49 PM
Hi Premal,
Unfortunately, using 'if xkomv-kbetr eq 0' does not work. Thanks for your info.
Joyce
07-20-2009 5:48 PM
06-17-2011 8:49 AM