Hi! I am trying to introduce variant pricing for 2 different characteristic fields.
One characteristic field is to calculate the base fees so this is pretty straight forward as I just need to maintain pricing condition record for the variable condition in SAP ECC.
Example of the pricing is:
BASE001 $50/unit
BASE002 $100/unit
The other characteristic field is to calculate the variable fees based on the number of animals and for this I am using the pricing factor formula to calculate the fees based on the number of animals maintained on the VC screen.
My formula is for example
$SET_PRICING_FACTOR($SELF,VARCOND, 'A001',Z_ANIMAL),
$SET_PRICING_FACTOR($SELF,VARCOND,'B001',Z_ANIMAL).
I then created a variant pricing condition record for the variable condition A001 and B001 in SAP ECC. The variant conditions are set up via tcode PMEVC to represent the type of animals (characteristic field 'TYPE_OF_ANIMAL').
Example of the pricing is:
A001 $10/unit
B001 $20/unit
What I achieved with the above set up is that if I maintain number of animal (Z_ANIMAL) with a value of 5 for animal type A001 (TYPE_OF_ANIMAL), the system will calculate $10 * 5 = $50.
The pricing conditions shown on the Pricing screen is:
VA00 for variant condition BASE001 $50
VA00 for variant condition A001 $50
This all works well for me except in a situation where my number of animals is ZERO. In this case, the system still include the variant condition for the number of animals, giving me:
VA00 for variant condition BASE001 $50
VA00 for variant condition A001 $10
Does anyone know of a way to not include the variant pricing if the number of animals is ZERO? Is this standard SAP's behaviour?
I have tried formula like
$SELF.VARCOND = ' ' if Z_ANIMAL = 0 and TYPE_OF_ANIMAL = 'A001' but it does not work as I ended up with zero value for both the base fee and variable fees.
Appreciate if anyone can shed some lights on this.
Cheers!
SF