Thursday, September 25, 2014

Sales and Distribution Pricing

SAP SD VOFM Routines

1. What is requirement routine in pricing?
2. What is alternate condition base value?
3. What is condition base value?
4. In which case we use alternate condition base value.
5. What is alternative condition type in which case we use alternate condition type? What is the purpose of using this?
6. Can any body tell me any difficult pricing procedure?

VOFM ROUTINES IN SALES AND DISTRIBUTION

Table of Contents

1. Introduction
2. Creating a New VOFM Formula
3. Scale Base
4. Condition Base Value
5. Condition Value
6. Structure of Group Key
7. Rounding Rule
8. Calculation Rule – Free Goods

1. Introduction
Transaction VOFM is a tool that was developed in R/3 to facilitate the definition of both SAP delivered as well as customer defined routines/rules used in the system during various business processes. VOFM routines are ABAP code written in Forms. VOFM provides the user with the benefit of choosing from one of the standard delivered R/3 routines or writing their own. VOFM is intended for the implementation team when configuring the system. It is not intended for the end user.

VOFM is divided up into four main areas. These include copying requirements, data transfer, requirements, and formulas. This paper will focus on formulas that were delivered by SAP to support the Sales & Distribution (SD) and Logistics Execution (LES) applications. At a high level, formulas are routines that define how a value should be calculated or determined in the R/3 system.
For example, a pricing condition value formula allows the user to define how a specific pricing value should be calculated. Similarly, a rounding rule formula defines how rounding should take place when pricing mass maintenance is performed. Formulas are a powerful tool allowing the user to adjust the way in which the system determines certain values. They can also be used to set certain variables in the coding, or even to call other programs.


Section 2 defines how to create a new VOFM routine, in the event that the standard routines do not match the user needs. In the remaining sections, the SAP standard delivered VOFM routines related to Sales & Distribution and Logistics Execution are documented. Starting with Release 4.6A, this documentation is part of the standard product. This paper assumes that the reader has a general understanding of the SD and LES modules in R/3 as well as a working understanding of the condition technique.

2. Creating a New VOFM Formula
In each area of VOFM, with the exception of Structure of Group Key Formulas, SAP delivers routines using the name space from 1 to 599. SAP customers can create their own VOFM routines using the name space from 600 to 999. With Structure of Group Key Formulas, the SAP name space is 1 to 49, and the customer name space is 50 to 99. To create a new routine, follow these steps:
1. First check to see whether you can use one of the formulas delivered in the standard system.
2. Either overwrite an existing formula or enter a new number on a new line from the customer name space
600 to 999. Also enter a short description of your formula.
3. Program your formula in the ABAP editor.
4. Activate the program.
5. Enter the application if you want to use the formula in a specific application area.
6. Enter your new formula in the appropriate area in customizing. For example, a new pricing condition value formula would be assigned to a condition type or value line in a pricing procedure. As another example, a free goods calculation rule would be assigned to a free goods condition record. New VOFM routines created at a customer site are not overwritten by a software upgrade.

3. Scale Base
A scale base formula can be used to alter the value that the system uses to read the scales in a condition record during pricing. In standard pricing, the system will read the scale in a pricing condition record using the quantity, value, weight, etc. of the document depending on the type of scale that has been defined.

Example:
Price Product A
From 0 cases
$50 per case
From 100 cases
$45 per case
From 500 cases
$40 per case
If the customer orders 100 cases of Product A, the system will read the pricing scale using 100 cases and determines the appropriate price, $45 per case. Using a scale base formula, it is possible to alter the value, in our example 100, prior to the scale being read. Scale base formulas are assigned to pricing condition types in R/3 configuration.
When looking at the code for the standard delivered scale base formulas or when writing your own,
XKWERT is the field name that the scale base value should be assigned to.
Following is a description of the scale base formulas delivered in the standard system.
SCALE BASE FORMULA 1: FREE
This is an example of a scale basis formula. It is not currently used.

SCALE BASE FORMULA 23: PARTIAL QUANTITY
The formula '23' sets the whole number part of the value to zero. For example, the value 203.559 would be
changed to 0.559. Formula '23' was delivered to support the R/3 delivered condition type KP03 to support
mixed pallet surcharges.
Example:
A company sells their products in cases. Each of their materials has a conversion factor to pallets. When an order is placed by a customer, the user would like the system to add up the quantities across items and compute the number of full pallets. If the customer does not order in full pallets, the user would like to charge a fixed surcharge of 20 USD. The user sets up condition type KP03 in the pricing procedure. In customizing for the condition type KP03, the scale base formula '23' is assigned as well as the group condition flag so that the quantities across order items can be considered. Within the condition records for condition type KP03, the user maintains a rate of "from 0.001 PAL" a fixed charge of 20 USD. If an order is placed, for example, that is equal to 10.35 pallets; the formula '23' will alter the value to 0.35 and then read the condition record scale. A surcharge of 20 USD would then be applied to the overall sales order.

SCALE BASE FORMULA 43: TAX LICENSE FRANCE
Formula '43' was delivered to support tax exemption licenses in France (R/3 delivered condition type LCFR) where the tax exemption is granted up to a certain invoiced amount. For additional information on tax exemption licenses, please refer to Note 72040.

SCALE BASE FORMULA 202: PRICE-BOOK SCALE
This requirement is used together with the feature 'Data determination in the access' (delivered with Release 4.5). In the R/3 delivered system, condition type PBUD can be used to determine a special scale basis in the pricing procedure. If scale basis formula '202' has been assigned to subsequent condition types that appear in the pricing procedure, the system uses the special scale basis versus the normal scale basis from the sales document line item. Further information about 'Data determination in the access' can be found in the R/3 Sales & Distribution documentation under the section titled 'Special pricing functions'.
Example:
A company wishes to define a pricing agreement that specifies that all customers in a certain customer group receive the price associated with ordering 100 cases of product regardless of how many cases are ordered. This involves fixing the scale basis for the customer group for a certain period of time. This can be accomplished by using the ‘Data determination in the access”. A condition type, such as PBUD can be used to define the fixed scale value of 100 cases. Subsequent condition types that should use this fixed value are then assigned scale base formula ‘202’.

4. Condition Base Value
Condition base value formulas can be used to influence the condition basis to which the pricing condition rate will be applied. In standard pricing, the system will apply the condition rate to the quantity in the sales document. For example, the price determined by the system is $45 per case for Product A. 100 cases of Product A have been ordered. The system would then multiply $45 times the number of cases of Product A ordered. Using a condition base value formula, it is possible to alter the condition base, in our example 100, prior to the calculation taking place. A condition base value formula is commonly used to determine the base for distributing header discounts / surcharges to the sales document line items. A condition base value formula is assigned to a condition type in the pricing procedure. When looking at the code for the standard delivered condition base value formulas or when writing your own, XKWERT is the field name that the condition base value should be assigned to. Following is a description of the condition base value formulas delivered in the standard system.
CONDITION BASE VALUE FORMULA 1: VOLUME
Formula '1' uses the volume of the sales document line item as the condition base value.
Example:
A company regularly applies fixed amount header discounts to a sales order. For example, the user may apply a fixed discount of 500 USD to the header of the sales order. Fixed header conditions are always distributed across the line items in the document. In this case, the company would like to distribute the fixed amount based on the volume of the line items. To accomplish this, the user would assign condition base value formula '1' to the header discount condition type in the pricing procedure.

CONDITION BASE VALUE FORMULA 2: NET VALUE
Formula '2' uses the net value of the sales document line item as the condition base value.
Example:
Reference example for formula 1

CONDITION BASE VALUE FORMULA 3: NET PRICE
Formula '3' was delivered to support net price processing. For additional information on the use of this
formula along with examples, please refer to Note 80183.

CONDITION BASE VALUE FORMULA 4: NET VALUE PLUS TAX
Formula '4' uses the net value plus tax of the sales document line item as the condition base value.
Example:
Reference example for formula 1

CONDITION BASE VALUE FORMULA 5: KZWI1
Formula '5' uses the value determined for subtotal '1' in the pricing procedure as the condition base value.
Example:
A company regularly applies fixed amount header discounts to a sales order. For example, the user may apply a fixed discount of 500 USD to the header of the sales order. Fixed header conditions are always distributed across the line items in the document. In this case, the company would like to distribute the fixed amount based on a subtotal derived based on certain values in the pricing procedure. The user has assigned subtotal '1' to the relevant pricing procedure value(s). In addition, the user would assign condition base value formula '5' to the header discount condition type in the pricing procedure.

CONDITION BASE VALUE FORMULA 6: KZWI2
Formula '5' uses the value determined for subtotal '2' in the pricing procedure as the condition base value.
Example:
Reference example for formula 5

CONDITION BASE VALUE FORMULA 7: KZWI3
Formula '5' uses the value determined for subtotal '3' in the pricing procedure as the condition base value.
Example:
Reference example for formula 5

CONDITION BASE VALUE FORMULA 11: CASH DISCOUNT BASE
Formula '11' can be used with the cash discount condition type. This formula reads the indicator for the company code to determine if the cash discount is based on the net value of the item. If it is not, then the system bases it off of the net value plus the tax.

CONDITION BASE VALUE FORMULA 12: GROSS WEIGHT
Formula '12' uses the gross weight of the sales document line item as the condition base value.
Example:
Reference example for formula 1

CONDITION BASE VALUE FORMULA 13: NET WEIGHT
Formula '13' uses the net weight of the sales document line item as the condition base value.
Example:
Reference example for formula 1

CONDITION BASE VALUE FORMULA 14: SET EXCLUSION INDICATOR
Formula '14' is an example of how a programmer can dynamically set the condition exclusion indicator based
on certain values. This condition exclusion indicator can then be checked in subsequent condition base value
formulas (reference formula '15') to exclude certain condition types.
CONDITION BASE VALUE FORMULA 15: CHECK EXCLUSION INDICATOR
Formula '15' is an example of how a programmer can check the value of the condition exclusion indicator and
then influence certain values. In this example, if the exclusion field is set to '$', the condition base value is set
to zero and the condition is marked inactive. This example is provided in combination with formula '14' which
shows how to dynamically set the condition exclusion indicator.
CONDITION BASE VALUE FORMULA 16: NET VALUE MINUS CASH DISCOUNT
Formula '16' uses the net value minus the cash discount value as the base value. This can, for example, be
applied to a tax condition type that should use this value as a basis.
CONDITION BASE VALUE FORMULA 17: NET PRICE
Formula '17' was delivered to support net price processing. For additional information on the use of this
formula along with examples, please refer to Note 80183.
CONDITION BASE VALUE FORMULA 18: NO QUANTITY CONVERSION
Formula '18' is used to avoid rounding errors that can occur for quantity dependent condition types where the sales unit and the pricing unit are one unit of measure and the base unit of measure is another. Using formula '18', no conversion is done to base unit of measure when the sales unit of measure and pricing unit of measure are identical.
NOTE: As of Release 4.0, this formula is no longer necessary. The user can achieve the same result by setting the "quantity conversion" indicator in condition type configuration.
Example:
A company uses KG as their base unit of measure, but chooses to quote prices and sell products in pieces (PC). A quantity conversion has been maintained to indicate that 3 PC correspond to 1 KG. A pricing record has been created to price 1 PC of product at 1 USD. If a customer orders, for example, 1 PC of product, it is possible that the system returns back an item value of 0.999 USD. To avoid this, the user assigns condition base value formula '18' to the price condition type as well as other quantity dependent condition types in the pricing procedure.

CONDITION BASE VALUE FORMULA 19: KZWI4
Formula '19' uses the value determined for subtotal '4' in the pricing procedure as the condition base value.
Example:
Reference example for formula 5

CONDITION BASE VALUE FORMULA 20: KZWI5
Formula '20' uses the value determined for subtotal '5' in the pricing procedure as the condition base value.

No comments: