Formulas used in Pricing Procedure
This post – describes how to create VOFM – different formulas used in pricing procedure.
In SD pricing, there are many formulas like requirement formula, calculation type formula, alt condition base value formula, scale formula, rounding formula and etc used.
Here main three – requirement formula, calculation type formula, alt condition base value formula are described how to create and use it.
Let’s start with a SD pricing procedure: Tx- V/08
Choose one and then choose Control.
In a pricing procedure, here 3 different columns are there for assigning different formula routines.
Formulas are a 3 digit numbers- 0 to 599 lies in SAP namespace and 600 to 999 lies in customer namespace.
If SAP standard delivered formulas don’t fit then organizations create there own to suit there requirement.
Here – we have requirement routines, calculation type routines and Base type routines. Lets focus on requirement routines. Do a F4.
Its shows all the requirement routines created in Tx- VOFM.
Open TX- VOFM
From- Requirement – choose Pricing option.
Here all the VOFM pricing requirements are available in pricing procedure.
For the demo purpose- here we will create a pricing requirement routine in customer namespace.
Provide number as – 999, description and assign to a application area V(for sales/distribution).
Select the routine number and choose edition symbol.
Continue.
Basically, routines are (SUBROUTINES) created in INCLUDE program. For demo i just mentioned breakpoint so that later we can see if this is gets called or not.
Finally we have to Activate the routine else it will not be called in PRICING.
So here the requirement routine is ready.
The F4 help options shows the routine 999.
Let’s assign the requirement routine to the condition type PR00.
Let’s create a sales order in Tx- VA01
Provide sold to party and a material and quantity and hit enter. The debugger is triggered.
Here is calls the requirement routine- 999 .
Similarly we can create – Formula->Condition Value in Tx- VOFM which can be assigned as Cal Type in the pricing procedure.
Similarly we can create – Formula->Condition base value in Tx- VOFM which can be assigned as Bas Type in the pricing procedure.
Apart from this, there are customizing where we can say which pricing fields from header/item are required for the formula.
KOMK- Pricing Header Communication Structure
KOMP- Pricing Item Communication Structure
Here the requirement formula- 999 assigned to the pricing procedure.
Execute Tx- VFPRCCUERATTR & the below screen appears.
Choose Scope- as- B
Execute with below details.
From- ROUTINES->Requirements->999 , here we have the formula subroutines.
Double click on – 999(requirement), click on create button.
The popup screen appears to choose which pricing fields is required for the routine.
Finally save it.