The Activity-Based Costing (ABC) module was first introduced in R/3 with Release 4.0 to allow users to access data in several other modules and to transfer costs or quantities from one to the other. This is accomplished with templates. Many users think that templates can only be used in the ABC module. However, from Release 4.0 to R/3 Enterprise, their use has been extended to many different applications, such as Profitability Analysis, Cost Center Planning (from 4.5 on), Easy Cost Planning, and Profit Center Planning (from 4.6C on). The author demonstrates how templates work with two examples, one for calculating costs on a product and one for forecasting production costs for an activity.
The Activity-Based Costing (ABC) module was first introduced in R/3 with Release 4.0 to allow users to access data in several other modules and to transfer costs or quantities from one module to the other. This is accomplished with templates. Many users think that templates can only be used in the ABC module. However, from Release 4.0 to R/3 Enterprise, their use has been extended to many different applications, including Profitability Analysis, Cost Center Planning (from 4.5 on), Easy Cost Planning, and Profit Center Planning (from 4.6C on).
For example, in the CO-PA module, you can track the number of inquiries or complaints made by a customer and attach costs to those activities. Resources such as labor hours are mapped to activities (handling customer inquiries). Then the activities are linked to profitability segments, in this case inquiry costs per customer group. In the allocation process, depicted in Figure 1, the template is the link between the object from which the costs and quantities are taken (sender) and the object that receives the calculated costs and quantities (receiver).
I’ll demonstrate how templates can provide you with a view of your costs in different Controlling (CO) applications. (See, "How Templates Work," below.) I’ll also give you an update on the latest developments for R/3 Enterprise in this area. (See, "The New (Inter)face of Template Maintenance," below.)
Let’s look at two examples that show you the required steps to run a template calculation, one for calculating costs on a product and one for forecasting production costs for an activity. The screenprints show the new screens and usability features available in R/3 Enterprise, but the same operations are available in previous releases.

Figure 1
Template-based costs/quantities in the plan/actual allocation process in R/3
Demonstration 1: Template-Based Product Costing
The first demonstration comes from the IDES data (SAP course AC420: Activity-Based Costing). This example gives you the steps (master data maintenance, template creation, assignment, and evaluation) necessary to use a template to calculate costs on a product.
Computer R-4050 becomes painted computer R-4000. What is the cost of the new product?
Step 1. Business Case and Master Data
Your company has just created the computer R-4000, based on the R-4050 with two additional processes (painting and drying) to give the computer a new color. (See Figure 2.) You have been asked to calculate the costs added by the painting and drying processes and to provide the total cost of the new product.
The cost of materials should be the same for the two computers because one includes the other in its bill of materials (check via transaction code CS03). They should differ in the processes they require to be produced, because the R-4000 needs two additional operations: painting and drying.
You might think the solution would be to define a different routing for product R-4000. However, this is not possible, because the number of processes depends on characteristic values such as color or the number of coats to be applied. The product itself defines these values, because the number of coats and time to dry might depend on the selected color. In this case, templates can sort out the cost of the new product, including the two new processes, without having to define as many products as the number of possible colors. Also keep in mind that the template defined here could be reused for any other product requiring painting and drying.

Figure 2
Two processes added
Step 2. Template Creation
To create a template for a material costing, I’ll use application COB (Cost Object Calculation) and environment 001 (Cost Estimate/Production Orders). This example uses transaction code CPT3 to display template T-PROD, which is a combination of three subtemplates that calculate separately the three main operations: painting for PC, work scheduling, and pallet moving. As this example focuses only on painting, double-click on Subtemplate T-PROD1 to jump to it (Figure 3).
This template contains two rows representing the two new business processes. Double-click on any cell of the plan activation columns and use template function MaterialCharacteristicValue to check that the color of the costed product is non-standard (Figure 4). In the quantity columns, use the same function to determine the number of coats to be applied. Multiplied by the number of products in the order, this gives the total number of times the painting and drying processes will be consumed by the costed order (Figure 5).
Thanks to generic formulas, you never have to define the product or the quantity in this template. You can use the same template for any product, whatever the quantity. For example, you could extend it to work scheduling or pallet moving (templates T-PROD2 and T-PROD3). You could also use T-PROD for both R-4000 and R-4050.

Figure 3
Template maintenance in R/3 Enterprise

Figure 4
Maintenance of plan activation formula

Figure 5
Maintenance of plan activation formula
How Templates Work
A template is a report form consisting of a set of columns and rules. The form can automatically access key planning parameters such as number of employees, planned work hours, or planned production. You can create (
CPT1), modify (
CPT2), or display (
CPT3) your own templates. This is useful when you are measuring items that change, such as hours worked or materials consumed. For instance, forecasting can easily become a nightmare if you calculate your costs on spreadsheets and enter them manually later on. Whenever any of your parameters are modified,
you have to make a lot of manual updates. If you use Cost Center Planning, you can run a template calculation to automatically update all affected cost centers.
Template Applications
In the same way that R/3 is divided into different modules, the template maintenance (creating or modifying templates) is divided into the following eight template applications:
- COB (from 4.0): Cost Objects. Used for cost object controlling for production, sales and process orders and in product cost planning. Here, the template is assigned to cost objects or products.
- ECP (from 4.6C): Easy Cost Planning. Used to plan costs for a measure or a job.
- ISB (from 4.0): Single transaction costing for banking services.
- CPI (from 4.6): Cost Center Formula Planning. Used to plan costs on cost centers.
- PAC (from 4.5): Profitability-Analysis Costing-based. Used to assign costs to profitability segments where the template is assigned.
- PCA (from 4.6C): Profit Center Formula Planning. Used to plan costs on profit centers.
- SBP (from 4.0): Structured Business Process. Used to control quantity flow for business processes, cost centers/activity types, or cost centers. Here, the template is assigned to a business process or cost centers in the master data.
- SOP (from 4.6): Process Quantity Determination, used mainly with the product cost collector.
Depending on the environment and on the release, the sender or source objects include: cost center/activity type combinations, business processes, statistical key figures, cost elements, resources, materials, services, accounts, and balance sheet accounts.
Template Environments
You don’t require the same kind of data to design your cost assignment scheme when dealing with production or process orders, business processes, or cost centers. This is why the eight applications (depending on the release) are divided into 37 environments (also depending on the release), as shown in Figure 1. Templates can select objects and calculate quantities or costs dynamically by using template functions determined by the template environment.
Therefore, before creating a template, you always have to choose a specific environment that will “pre-select” the appropriate template functions that enable you to dynamically select objects, calculate quantities or costs, and determine activation conditions. The selection is made via the template function maintenance transaction code CTU6.

Figure 1
Template selection screen

Figure 2
Some of the template functions available via transaction CTU6 to select objects, calculate quantities or cost, and define activation routines
Step 3. Template Assignment and Template Evaluation
Now that you have the product and the template, you need to link them. This is done via transaction KTPF, where the overhead group and costing sheet of the product determine the template that will be processed. Here, T-PROD is linked to R-4000 and R-4050. Therefore, T-PROD1, as a sub-template of template T-PROD, is evaluated during the template-based costing of products R-4000 and R-4050.
In transaction CK11N, create a material cost estimate on the material R-4000. This example uses the costing variant PPC1 (this defines the costing sheet). In the costing structure, choose Only materials/All items to display the cost of drivers that were included during template allocation to give you the details of the calculated costs. The values shown in Figure 6 depend on the functions you have defined in the template, the planned fixed and planned cost data (transaction code CP26), and the costing lot size.
Click on the Total Valuation tab to find the costing sheet, the overhead key, and the template used for this cost estimate. You can choose Extras> Information>Template Evaluation to get to the template trace, which is linked to the template maintenance tool—the tool that gives all details on how the quantities and costs were calculated.

Figure 6
Cost estimate display
Demonstration 2: Template-Based Cost Center Planning
Planning is one of the key processes for cost management. Most of the time, cost center managers have difficulties forecasting the costs related to their activity, as they only have a rough idea of the amount of work they will have to process during the next period. For instance, in the previous example, planning the direct labor costs was not easy because the amount of activity for the business processes painting and drying was not already fixed. This is because it depends on the planned production, which in turn, depends on the sales forecasts, and so on.
You can avoid this endless loop by using templates. Thanks to the fact that template functions can get data from other modules and that they have a generic aspect, it is now possible to enter your planning once without any need to change values each time the dependent basic data (such as the number of working hours) is changed by another parameter (such as the number of computers to be produced).
In this example, I will show you how to plan your production in a separate way. By planning the number of computers to produce, you plan the use of business processes "paint" and "dry." These two processes consume direct labor costs based on hours. Now, you need to calculate the related costs.
Let’s assume that an average employee works 160 hours over one period and his wage is around $1,000.
The environment to use here is Activity-dependent cost center planning (CPD) because the basis for your planning is the number of requested hours. If you look at the available columns, you see that you can plan fixed and variable costs and/or fixed and variable quantities.
To create a template in environment CPD, I’m choosing Cost Element 420000 Direct Labor Costs. In the fixed plan costs per period, use function OwnPlanQuantity to get the plan quantity for the current cost element.
Divide this value by the number of hours per employee per period (160) to get the number of necessary employees. You can use mathematical function ceil ( ) to round this figure to the next whole number and therefore avoid an unrounded number of employees. Then multiply this value by the average salary for each employee ($1,000) to get the fixed costs.
Later, you can modify your production forecasts as often as you want by running a plan evaluation to update your planned labor costs.
The New (Inter)face of Template Maintenance
Although the functions and applications were not modified for the new R/3 Enterprise release, the interface and performances were completely overhauled. The interface of the template maintenance in Enterprise uses new GUI controls to integrate all necessary tools via the all-in-one-screen concept.
By clicking on formulas in the formula editor on the formula list, you can get the details in the editor and modify them from there. Drag & Drop from the function tree to the editor tree of the template functions is already selected for you. Next, enter the necessary parameters using other template functions or fixed values shown in the new parameter dialog box (Figure 1).
Other modifications include preparatory checks (preventing invalid formulas) and improved copy and paste processing. New parallel processing is also available with the release. This functionality aims to reduce template-processing time by spreading the calculation over several servers.
Special efforts were also made to increase the openness of the template tool: new Business Application Program Interfaces (BAPIs) were created, Business Add-Ins (BADIs) were inserted, and a new function group provides you with the basic interface to create your own template functions (see SAP note 528430).

Figure 1
New parameter dialog box
Julien Delvat
Julien Delvat graduated from the Ceram Sophia Antipolis (French Management School) and had experience in the cost management team of a service company before joining SAP. He has been working for the past year as a developer on the re-building of the template tool for R/3 Enterprise and now takes part in new developments on subjects such as the Value Network Analyzer.
You may contact the author at julien.delvat@sap.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.