Dit is de html-versie van het bestand ftp://24.145.161.230/My_Book/Cyber%20Backup%208_7_13/Capgemini%2007_30_13/Training%20Material/SAP%20Financials%20Expert%20Articles/Volume%2005%20(2006)/Issu G o o g l e maakt automatisch een html-versie van documenten bij het indexeren van het web.
3 Steps to Find the Standard Cost for a Configurable Product by Akhil esh Mittal, Consultant, Infosys Technologies Ltd. Costing, CO-PA
Variant configuration functionality ity in SAP allows you to have one material master, master, product bill of ma material, terial, routing, routing, and sales pricing w hen customers customers configure a product f rom several options. options. How ever, standard SAP allow s you to maintain only one standard cos t in the accounting view of the material master. Use this method to dynamically produce a standard c ost w hen configur able materials materials res ult in multiple standard costs .
Key Concept A standard cost is cost is a cost you use to measure measure production effic iency f or manufactured products. products. It is significant for organizations zations as it helps helps them in valuating the finished and semi-finished semi-finished products (inventory valuation). valuation). Inventory Inventory valuation valuation forms a part of the current assets in the balance balance s heet. You also can use standard cost f or margin analysis analysis using the Profitability Profitability Analysis (CO-PA) (CO-PA) module module in SAP. A product can have only one standard cost at a given time for c orrect v aluation aluation of inventory and margin analysis. SAP recommends recommends the use of standard cost f or f inished and semi-finished semi-finished products. Alternatively, you can use moving average price, but it leads to unrealistic inventory valuations and you can’t conduct margin analysis in the absence of standard cost. Variant configuration functionality ity allows customers to select product f eatures according to their requirements. requirements. An example example of a configure-to-order (CT (CTO) O) 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) KMAT ) is a challenge. The product conf iguration is dynamic; the customer configur es the product w hen it places the sales order. In the case of a static product, you can easily upload the standard standard cost for a finished good product product (material type FERT) FERT) to the material master. R/3 provides the costing run functionality through transaction code CK40N, CK40N, w hich you you can use to upload the standard c ost to the material master master f or cor rect material valuation. Although my example refer s to R/3, the functionality als o w orks in mySAP ERP ERP Central Component Component (ECC). Since R/3 provides c alculation of standard cos t only for those materials whos e composition (produc t BOM) is know n, it cannot calculate the cost f or a configurable material using Costing Run functionality (tr ansaction CK40N). CK40N). However, you can use a w orkaround orkaround to dynamically cally calculate the standard standard cost for a configurable product product at the time of the creation of a s ales order. This three-step approach approach is not documented documented elsewhere; I developed it through experience and research.
Note A sub-optimal sub-optimal solution solution would be to create a separate material master master for each possible product product configuration on and and store the standard cost in the material masters. masters. However, this w ould imply mply that you can’t leverage 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 func tionality for material m maintenance aintenance and work around the restric tion of one standard cost per material. material.
Define Configurable Products You can use material type KMAT to KMAT to define configurable products in R/3. To do this, use transaction code MM01 and MM01 and material type KMAT to KMAT to manually define the material master. You can make material configurable by going to the material material master basic data v iew . Check the Material is configurable check box. You need to do this only once initially while cr eating the material master. This is a prerequisite for us ing variant conf iguration functionality in an SAP system. Figure 1 show 1 show s an example of of a conf igurable laptop, defined using material material type KMAT, KMAT, w hich demonstrates demonstrates t he problem of standard cos t calculation.
Figure 1
Configurable material check box in material master basic data view
The illustration of a configurable laptop in Table 1 show 1 show s that the customer customer can choose among among three types of hard disk, tw o types of RAM, two ty pes of process or, and two v ariants of keyboard and mouse. The The possible number of product combinations for one KMAT material 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 I’ll guide de you through all the SA P KMAT material. Now configuration steps to cost configurable products. products.
Configur atio n 1 Amount
Co nfigur ation 2
Amo unt
Hard dis k (20 GB)
$100
Hard dis k (80 GB)
$200
RA M (64 MB)
$200
RA M (128 MB)
$350
Proc ess or ( 1 GHz)
$400
Proc es s or (1 GHz )
$400
Key board/mous e (KB)
$25
Keyboard/mouse ( KB)
$25
Standar d cos t
$725
Standar d cos t
$975
Total standard cost = the sum of the standard cost of components Possible standard cost = multiplication of the number of characteristic values Illustration of dynamic cost calculation
Table 1
SAP Configuration You use three pieces of configuration to calculate calculate the product cost dynamically ly f rom its parts during the sales order creation. Once Once the sy stem has calculated calculated the standard cost in the sales order, y ou 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 w ork together together to make the the costing of configurable products products w ork in R/3: R/3: Step 1. Set up the variant configuration relevant for standard costing Step 2. Modify the Sales and Distribution (SD) pricing procedure Step 3. Put user exit changes in place for a third-party procurement scenario
Step 1. S et Up the Va riant Configuration Configuration Relevant Relevant for Sta ndard Costing Create a material master for the KMAT material KMAT material — in my example in Table 1, a laptop — by using transaction code MM01. 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) accounting view of the KMAT material Price field (Figure 2) in the accounting 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) master f or valuating the inventory in the subsequent acc ounting documents. If you leave this f ield blank, R/3 show s an error at the time of MBEW-STPRS) in the material master 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 functionality to define the product c haracteristics. Follow Follow this process to capture the dynamic dynamic standard cost f or the conf igurable product in the s ales order through pricing reference characteristic: Create Create a pricing ref erence characteristic v ia transaction code CT04 Add a procedure procedure to characteristic values values via transaction code CT04 Include Include the pricing reference characteristic w hen you define the class f or the KMAT material 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 v alues alues of the product during the sales order pricing f or calculation of s tandard tandard cost. The pricing reference characteristic acts as a medium um to make make the characteristic values available at the time time of sales order pricing. Create a pricing reference characteristic via transaction code CT04 . Create a reference characteristic w ith a characteristic group REF using transaction code CT04 ( CT04 (Figure Figure 3). 3). Enter REF in the Chars Group field. 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 Basic d ata tab ata tab to define the pricing reference characteristic.
Figure 3
Pricing Pricin g ref erence characteristic
Connect the pricing r eference c haracteristic w ith the sales procedure by manually entering the c ommunication str ucture 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 cost.
Figure 4
Reference table in pricing ref erence characteristic
Add a procedure to characteristi c values via transaction code CT04 . Write $self.
[='' in the procedure ( Figure 5), replacing ][ w ith the name of the reference c haracteristic and w ith the name of the char acteris tic value. In my example, these refer to ZPRREFCHAR and ZRAM-VAR1, respectively. Do this w hen 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 values. Include the pricing reference characteris tic when you define the class for the KMAT material via transacti on 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 c lass definition
The configurable product (the laptop) and the product char acteris tics have just one link, w hich you can create manually through transac tion code CU41 by defining a profile for the configurable material and then associating it with the Class. It is ess ential to include the pricing reference c haracteristic in the definition of Class to link it w ith the configurable product s o you can use it during sales order pric ing.
Step 2. Modify the SD Pricing Proce dure Follow three procedures to produce SD pricing procedure changes: Create a new pricing condition for r ecording the standard cos t in SD documents via transac tion code V/06 Create condition records f or the new pricing condition via transaction code VK11 to maintain the standard cost of all the characteristic values Modify the SD pricing proc edure to add the new cost c ondition Create a new prici ng condition for recordi ng the standard cost in SD documents via transacti on code V/06 . In transaction code V/06 (Figure 7) set Cond.category (c ondition category) to O. Condition category O enables it to interact w ith the communication structure SDCOM and fetches the product c onfiguration characteristic values as stored in the pricing reference characteristic.
Figure 7
Define cost condition
Create condition records for the new prici ng condition via transaction code VK11 to maintain the standard cost of all the characteris tic values. Use transaction code VK11 to cr eate condition records f or all the characteristic values to store the standard cost associated w ith each part ( Figure 8). You c an access these condition records f rom the sales order pric ing procedure to populate the new cost c ondition (standard cost condition ZCOS in my example), w hich 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 y our pricing procedure. Go to Control in the left side panel and add the requirement to the new cost c ondition so it is selected only f or 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 VPRS requirement 10 In the sales order, the ref erence pricing procedure passes on the characteristic v alues to SD pricing through the SDCOM structure. The new standard cost pricing condition picks up the standard cost c ondition value for the characteristic f rom the condition table, which is maintained on the basis of the characteristic v alue VARCOND-KOMP field (Figure 11). The subtotal adds up the standard cos t condition values and w rites it to VBAPWAVWR.
Figure 11 Illustration of a sales order You use the VBAP-WAVWR f ield to post the goods issue at s tandard cost if the KMAT material is not a sales order stock. For sales order stock, make a modification in user exit MV50AFZ1 (USEREXIT_SAVE_DOCUMENT_PREPARE or USEREXIT_SAVE_DOCUMENT) to reference the standard cost from VBAP-WAVWR instead of EBEW-STPRS, w hich is the sales order stock valuation table. If the production order is created w ith reference to the sales order line item, then it makes the stock a sales order s tock. Under suc h a s cenario, standard SAP references the EBEW-STPRS field for s tandard cost. Therefore, you must modify the user exit so the sy stem can pick up the standard cost from VBAP-WAVWR and not from EBEW-STRPS. The system passes on the cos t condition to billing through a copy routine. Map the new pric ing condition to a value field in Profitability Analy sis (CO-PA) so you c an use the standard cost in CO-PA f or prof itability 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 f or creating the accounting documents. Use the VBAP-WAVWR 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 EBEWSTPRS 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 inter-company billing document. RD04 is an SAP predef ined billing output that you need to assoc iate w ith the output determination procedure that the inter- company billing document uses . RD04 automatically generates the inter-company A/P IDoc. You need to create inter-c ompany A/P and A/R documents w ithin the company codes to ref lect the purchase of the product fr om the vendor plant’s company code by the company code attached to the sales organization. Use these to capture the standard cost from the EBEW-STPRS f ield. This change is r equired in specific s cenarios in case the company code of the sales organization and the vendor plant are diff erent.
Note In the case of a multi-company code s cenario (using different c urrencies), you’ll have to adjust the s tandard cost value stored in the EBEW-STPRS field for the appropriate foreign exchange rate. This is required because the VBAP-WAVWR field stores the value in the document currency of the company code to w hich you ass ign the sales organization. You need to store the value in the EBEW-STPRS field in the currency of the valuation area (company code to w hich you ass ign the plant), and in case of a multi-company code scenario, the tw o currenc ies might be diff erent. You can calc ulate the exchange rate using the SAP standard function READ_EXCHANGE_RATE, w hich 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 proc essing progr am of the inter-c ompany A/P IDoc. This user exit is r equired only w hen you need to w rite additional processing logic f or proces sing 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 doesn’t contain the link w ith the customer sales order. If you need this link to conduct rec onciliation of A/P documents with r eferenc e to the sales order , you can code the logic to populate the sales order r eferenc e in the inter-c ompany A/P document in this user ex it. For the solution discus sed in this article, you don’t need to make modifications to this user exit.
Akhilesh Mittal is an SAP consultant at Infosy s Technologies Ltd. w ith four y ears of consulting exper ience. He has experience in the SAP FI module along w ith exposur e to the Sales and Distribution module. Akhilesh is curr ently a cons ultant in the SAP space for a leading organization in the high technology domain. He has a degree in electronics and communication engineering from IIT Guwahati and an MBA in finance and sys tems from IIM Lucknow . You may c ontact him by email at Akhilesh_mittal@infosys .com or [email protected].