You are on page 1of 12

3 Steps to Find the Standard Cost for

a Configurable Product
by Akhilesh Mittal, Lead Consultant, Infosys Technologies Ltd.
November 15, 2006
Variant configuration functionality in SAP allows you to
have one material master, product bill of material, routing,
and sales pricing when customers configure a product
from several options. However, a standard SAP system
allows you to maintain only one standard cost in the
accounting view of the material master. Use this method
to dynamically produce a standard cost when
configurable materials result in multiple standard costs.
Key Concept
A standard cost is a cost you use to measure production
efficiency for manufactured products. It is significant for
organizations as it helps them in valuating the finished and
semi-finished products (inventory valuation). Inventory
valuation forms a part of the current assets in the balance
sheet. You also can use standard cost for margin analysis
using the Profitability Analysis (CO- PA) module in SAP. A
product can have only one standard cost at a given time for
correct valuation of inventory and margin analysis. SAP
recommends the use of standard cost for finished and semifinished products. Alternatively, you can use moving average
price, but it leads to unrealistic inventory valuations and you
cant conduct margin analysis in the absence of standard

Variant configuration functionality allows customers to select

product features according to their requirements. An example
of a configure-to-order (CTO) product is a laptop with options
such as RAM, a hard disk, a processing unit, and a mouse.
Determining the standard cost for such a configurable product
(material type KMAT) is a challenge. The product
configuration is dynamic; the customer configures the product
when it places the sales order. In the case of a static product,
you can easily upload the standard cost for a finished good
product (material type FERT) to the material master. R/3
provides the costing run functionality through transaction code
CK40N, which you can use to upload the standard cost to the
material master for correct material valuation. Although my
example refers to R/3, the functionality also works in mySAP
ERP Central Component (ECC).
Since R/3 provides calculation of standard cost only for those
materials whose composition (product BOM) is known, it
cannot calculate the cost for a configurable material using
Costing Run functionality (transaction CK40N). However, you
can use a workaround to dynamically calculate the standard
cost for a configurable product at the time of the creation of a
sales order. This three-step approach is not documented

elsewhere; I developed it through experience and research.

A sub-optimal solution would be to create a separate
material master for each possible product configuration and
store the standard cost in the material masters. However,
this would imply that you cant leverage the variant
configuration functionality provided by SAP for configurable
products by maintaining only one material master, one
routing, and one bill of material (BOM). With my approach
you can use the variant configuration functionality for
material maintenance and work around the restriction of one
standard cost per material.

Define Configurable Products

You can use material type KMAT to define configurable
products in R/3. To do this, use transaction code MM01 and
material type KMAT to manually define the material master.
You can make material configurable by going to the material
master basic data view. Check the Material is configurable
check box. You need to do this only once initially while
creating the material master. This is a prerequisite for using
variant configuration functionality in an SAP system.
Figure 1 shows an example of a configurable laptop, defined
using material type KMAT, which demonstrates the problem of
standard cost calculation.

Figure 1
Configurable material check box in material
master basic data view
The illustration of a configurable laptop in Table 1 shows that
the customer can choose among three types of hard disk, two
types of RAM, two types of processor, and two variants of
keyboard and mouse. The possible number of product
combinations for one KMAT material here is 24 [3*2*2*2]. The
standard cost of any one of these product combinations is the
sum of the standard costs of its parts that constitute the
product. The R/3 material master provides the flexibility to
store only one standard cost, but the problem here is the need
to maintain multiple standard costs for one KMAT material.
Now Ill guide you through all the SAP configuration steps to
cost configurable products.

Table 1
Illustration of dynamic cost calculation

SAP Configuration
You use three pieces of configuration to calculate the product
cost dynamically from its parts during the sales order creation.
Once the system has calculated the standard cost in the sales
order, you can use the same standard cost to book inventory
cost at the correct standard cost in the accounting documents.
Later on, you can use this for margin analysis. The three
pieces of R/3 configuration are independent of each other and
they work together to make the costing of configurable
products work in R/3:
Step 1. Set up the variant configuration relevant for standard
Step 2. Modify the Sales and Distribution (SD) pricing
Step 3. Put user exit changes in place for a third-party
procurement scenario

Step 1. Set Up the Variant

Configuration Relevant for
Standard Costing

Create a material master for the KMAT material in my

example in Table 1, a laptop by using transaction code
MM01. Create a material master for all the characteristic
values. Characteristic values are the components of the

laptop, such as 20 GB hard disk, 40 GB hard disk, and 80 GB

hard disk (Table 1). This example has nine characteristic
values: 3+2+2+2=9.
Enter 0.01 in the Standard Price field (Figure 2) in the
accounting view of the KMAT material as the dummy standard
cost. I use a dummy standard cost in the material master
because standard R/3 tries to pick the standard cost of the
material from this field (MBEW- STPRS) in the material
master for valuating the inventory in the subsequent
accounting documents. If you leave this field blank, R/3 shows
an error at the time of accounting document creation because
of the failure of initial R/3 checks. The process I am describing
does not remove the SAP data validation checks as these are
done automatically by the standard SAP core code logic.
Rather, it alters the logic for picking the standard cost.

Figure 2
Dummy standard cost
Use the variant configuration functionality to define the product
characteristics. Follow this process to capture the dynamic
standard cost for the configurable product in the sales order
through pricing reference characteristic:
Create a pricing reference characteristic via transaction
code CT04
Add a procedure to characteristic values via transaction
code CT04
Include the pricing reference characteristic when you
define the class for the KMAT material via transaction
code CL01
You determine the product configuration at the time of sales
order creation. At a technical level, this implies the selection of

characteristic values that constitute the configurable product.

The system requires the characteristic values of the product
during the sales order pricing for calculation of standard cost.
The pricing reference characteristic acts as a medium to make
the characteristic values available at the time of sales order
Create a pricing reference characteristic via transaction code
CT04. Create a reference characteristic with a characteristic
group REF using transaction code CT04 (Figure 3). Enter
REF in the Chars Group field. Enter ZPRREFCHAR in the
Characteristic field. Then enter the start date, in my example
10/05/2006, to provide the validity start date of the
characteristic. Press Enter and click on the Yes button to
create a new characteristic. Fill in the Basic data tab to define
the pricing reference characteristic.

Figure 3
Pricing reference characteristic
Connect the pricing reference characteristic with the sales
procedure by manually entering the communication structure
SDCOM in the Table name field in the Addnl data (additional
data) tab (Figure 4). You must do this to make the variant
configuration values available to the SD module through the
SDCOM communication structure. Once the setup is
complete, the system automatically transfers the product
configuration (selected characteristic values of the product) to
sales order pricing for dynamic computation of the standard

Figure 4
Reference table in pricing reference
Add a procedure to characteristic values via transaction code
CT04. Write $self.='' in the procedure (Figure 5), replacing
with the name of the reference characteristic and with the
name of the characteristic value. In my example, these refer to
ZPRREFCHAR and ZRAM-VAR1, respectively. Do this when
you define the characteristics using transaction code CT04.
Go to the Values tab and from the menu path select
Extras>Object dependencies>Editor. Select Procedure as
the relationship type to input the illustrated code, which you
must do for all the characteristics other than the pricing
reference characteristic. This enables the reference
characteristic to hold the values of selected characteristic
Include the pricing reference characteristic when you define
the class for the KMAT material via transaction code CL01.
Use transaction code CL01 and enter 300 in the Class type
field to enable use of the characteristics to configure a
material. Include the pricing reference characteristic as defined
in the Class definition (Figure 6).

Figure 5
Define the procedure

Figure 6
Pricing reference characteristic in class

The configurable product (the laptop) and the product

characteristics have just one link, which you can create
manually through transaction code CU41 by defining a profile
for the configurable material and then associating it with the
Class. It is essential to include the pricing reference
characteristic in the definition of Class to link it with the
configurable product so you can use it during sales order

Step 2. Modify the SD Pricing


Follow three procedures to produce SD pricing procedure


Create a new pricing condition for recording the

standard cost in SD documents via transaction code
Create condition records for the new pricing condition
via transaction code VK11 to maintain the standard
cost of all the characteristic values
Modify the SD pricing procedure to add the new cost
Create a new pricing condition for recording the standard cost
in SD documents via transaction code V/06. In transaction
code V/06 (Figure 7) set Cond.category (condition category)
to O. Condition category O enables it to interact with the
communication structure SDCOM and fetches the product
configuration characteristic values as stored in the pricing
reference characteristic.

Figure 7
Define cost condition
Create condition records for the new pricing condition via
transaction code VK11 to maintain the standard cost of all the
characteristic values. Use transaction code VK11 to create
condition records for all the characteristic values to store the
standard cost associated with each part (Figure 8). You can
access these condition records from the sales order pricing
procedure to populate the new cost condition (standard cost
condition ZCOS in my example), which later on adds up in
the sales order pricing procedure to form the standard cost of
the configured product.

Figure 8
Condition records
Modify the SD pricing procedure to add the new cost
condition. Use transaction code V/08 to select your pricing
procedure. Go to Control in the left side panel and add the
requirement to the new cost condition so it is selected only for
KMAT materials (Figure 9). Enter B in the SubT (Subtotal
Type) column to add the standard costs of all the
characteristics. Use the opposite requirement logic to limit the
SAP standard cost condition VPRS in the pricing procedure
(Figure 10).

Figure 9
Pricing procedure

Figure 10
VPRS requirement
In the sales order, the reference pricing procedure passes on
the characteristic values to SD pricing through the SDCOM
structure. The new standard cost pricing condition picks up the
standard cost condition value for the characteristic from the
condition table, which is maintained on the basis of the
characteristic value VARCOND-KOMP field (Figure 11). The
subtotal adds up the standard cost condition values and writes

Figure 11
Illustration of a sales order
You use the VBAP-WAVWR field to post the goods issue at
standard cost if the KMAT material is not a sales order stock.
For sales order stock, make a modification in user exit
USEREXIT_SAVE_DOCUMENT) to reference the standard
cost from VBAP-WAVWR instead of EBEW- STPRS, which is
the sales order stock valuation table. If the production order is
created with reference to the sales order line item, then it
makes the stock a sales order stock. Under such a scenario,
standard SAP references the EBEW-STPRS field for standard

cost. Therefore, you must modify the user exit so the system
can pick up the standard cost from VBAP-WAVWR and not
The system passes on the cost condition to billing through a
copy routine. Map the new pricing condition to a value field in
Profitability Analysis (CO-PA) so you can use the standard
cost in CO-PA for profitability analysis.

Step 3. Put User Exit Changes in

Place for a Third-Party
Procurement Scenario
Third-party procurement implies creation of a purchase order
(PO) from the sales order. In this case the KMAT material
needs to be sales order stock. A sales order stock implies that
the sales order itself must trigger the purchase order. The
schedule lines of the sales order line item capture the
purchase order information so that the vendor can supply
directly to the customer against the specific sales order
material configuration.
R/3 automatically triggers user exit ZXCKAU04 at the time of
goods receipt on the PO. For sales order stock, the system
automatically picks up the standard cost from EBEW-STPRS
for creating the accounting documents. Use the VBAPWAVWR value through the user exit to book the inventory at
standard cost at the time of goods receipt (movement type
101E). Use the user exit ZXCKAU04 to record this value in
the EBEW- STPRS field. Per standard SAP logic, post goods
issue (PGI) against the sales order (movement type 601E)
happens at the standard cost in the EBEW- STPRS field. I
already stored the standard cost value through the user exit in
this field; the system automatically makes the bookings at the
standard cost at the time of PGI.
R/3 automatically triggers user exits ZXEPFF02 and
ZXEDFU02 at the time of creation of an inter-company A/P
IDoc through billing output condition RD04 from the intercompany billing document. RD04 is an SAP predefined billing
output that you need to associate with the output
determination procedure that the inter- company billing
document uses. RD04 automatically generates the intercompany A/P IDoc.
You need to create inter-company A/P and A/R documents
within the company codes to reflect the purchase of the
product from the vendor plants company code by the
company code attached to the sales organization. Use these
to capture the standard cost from the EBEW- STPRS field.
This change is required in specific scenarios in case the
company code of the sales organization and the vendor plant
are different.
In the case of a multi-company code scenario (using

different currencies), youll have to adjust the standard cost

value stored in the EBEW- STPRS field for the appropriate
foreign exchange rate. This is required because the VBAPWAVWR field stores the value in the document currency of
the company code to which you assign the sales
organization. You need to store the value in the EBEWSTPRS field in the currency of the valuation area (company
code to which you assign the plant), and in case of a multicompany code scenario, the two currencies might be
different. You can calculate the exchange rate using the
SAP standard function READ_EXCHANGE_RATE, which
you can view using transaction code SE37. When multiplied
by the value in VBAP-WAVWR it gives the exchange rate
adjusted value for EBEW-STPRS.
User exit ZXF06U06 is for the processing program of the
inter- company A/P IDoc. This user exit is required only when
you need to write additional processing logic for processing the
inter-company A/P IDoc.
An example of the use of this user exit would be to pass
reference values to an inter-company A/P document. The
inter-company A/P document doesnt contain the link with the
customer sales order. If you need this link to conduct
reconciliation of A/P documents with reference to the sales
order, you can code the logic to populate the sales order
reference in the inter-company A/P document in this user exit.
For the solution discussed in this article, you dont need to
make modifications to this user exit.