Show TOC

Function documentationVariance Calculation

 

You can calculate variances for the following objects:

Variance calculation provides you with detailed cost information on products or manufacturing orders.

The variance calculation function:

  • Shows the variance between target costs and control costs (the control costs can be the net actual costs, for example)

  • Determines the difference between the actual costs debited to the object and the credit from goods receipts (total variance)

  • Valuates the unplanned scrap quantities with target costs to determine the scrap variances

  • Determines production variances and planning variances for informational purposes

  • Shows the causes of the variances and assigns the variances to different variance categories depending on the cause

The system updates the variances by object for each cost element, or for each cost element and origin.

Variance calculation provides you with the information you need before you can take steps to improve your cost situation.

Integration

You can use the Schedule Manager to assist you in performing the period-end closing activities. For more information, refer to the following sections:

If you use the Schedule Manager with the flow definition, you can use the multilevel worklist to reprocess the faulty objects. For more information, see the following section:

Multilevel Worklist

You can transfer the total variances calculated in the variance calculation process to Profitability Analysis (CO-PA) when you settle.

In variance calculation, you can use user-defined error management to indirectly influence the program flow. For more information, see User-Defined Error Management in Cost Object Controlling and the explanations below.

Prerequisites

You can calculate variances separately in each period or cumulatively. The default rule in the order type determines whether the variances are calculated cumulatively or periodically.

All manufacturing orders or product cost collectors for which you want to calculate variances by period in the Product Cost by Period component must be settled by period. The settlement rule for the order must contain a distribution rule that specifies settlement type PER (periodic). For product cost collectors, use default rule STR (with strategy for tracing factor determination). For manufacturing orders, use default rule PP2 (Production Material Periodic Settlement). You define the default rule in Customizing for Product Cost Controlling under Define Default Values for Order Types.

You calculate cumulative variances for all orders for which you want to analyze costs by lot. The settlement rule for the order must contain a distribution rule that specifies settlement type FUL (full settlement). Go into Customizing for Product Cost Controlling under Start of the navigation path Cost Object Controlling Next navigation step Product Cost by Order Next navigation step Manufacturing Orders Next navigation step Define Cost-Accounting-Relevant Default Values for Order Types and Plants End of the navigation path and enter default rule PP1 (Production Material Full Settlement). For production orders and process orders, this is the default rule in the standard system.

Make the necessary settings in Customizing for Product Cost by Order or Product Cost by Period.

You must make sure that the following requirements are met:

  • An itemization exists for the cost estimate used to calculate the target costs.

  • The material components listed in the BOM of the cost estimate used to calculate the target costs are assigned to the operations in which they are consumed.

    Otherwise it is not possible to correctly report the variances and scrap when operations are confirmed.

  • The object for which the variances are calculated contains a valid variance key.

  • In the Product Cost by Order component, the order has the status DLV (delivered) or TECO (technically completed).

    During the variance calculation process, the system also reads the orders for which the status DLV or TECO has been active. If the status was withdrawn, any variances and scrap variances are canceled.

  • The Material Origin indicator in the costing view of the material master record is selected for all cost-critical material components, or you are using origin groups.

    The system can then tell which materials caused which variances under which primary cost element.

    If you have already created material master records in which the Material Origin indicator is not selected, you can use report RKHKMAT0 to select the indicator. To do this, choose Start of the navigation path Tools Next navigation step ABAP Workbench Next navigation step Development Next navigation step ABAP Editor End of the navigation path.

    Note Note

    Note that if the Material Origin indicator is selected or if you are using origin groups, the increased data volume can reduce system performance during the period-end closing activities. It is therefore recommended that you use these functions only for materials that have a strong influence on your costs.

    Be sure to select the Material Origin indicator before you create the standard cost estimate for the material.

    End of the note.
  • The manufacturing order or product cost collector for which you want to calculate variances has a variance key.

    You can specify a separate default variance key in Customizing for each plant. The system then transfers the variance key into the master records of the materials which you then create. If you then create a manufacturing order or product cost collector for the material, the system transfers the variance key into the master record of the manufacturing order or product cost collector.

If you want to calculate the total variance, the following requirements must be met:

  • In make-to-stock production, the standard cost estimate for the material must always be released.

  • The standard cost estimate for the material must meet the following requirements:

    • For product cost collectors with the settlement type PER (periodic), the standard cost estimate must be valid on the last day of the posting period.

    • For manufacturing orders (production orders and process orders) with settlement type FUL (full settlement), the standard cost estimate must be valid at the time of the last delivery.

In sales-order-related production, the cost estimate with which the standard price was calculated is used to determine the total variance (see also: Standard Price with Valuated Sales Order Stocks).

To determine which standard cost estimate is active in the period, look at the costing view of the material's master record.

You can use the following entries to identify the cost estimate on which the current standard price is based:

  • Period

  • Fiscal year

  • Valuation variant

  • Costing version

Before you can calculate the variances, you must carry out the following steps in Customizing for Product Cost Controlling in Cost Object Controlling under Product Cost by Period or Product Cost by Order Start of the navigation path Period-End Closing Next navigation step Variance Calculation End of the navigation path:

  • Define Variance Keys

    If you want to valuate the unplanned scrap during variance calculation, set the Scrap indicator.

  • Define Variance Keys for Plants

  • Define Variance Variants

    Set the Scrap variances indicator if you want to see the scrap variances and the actual costs that correspond to the scrap variances in the target cost version to which that variance variant is assigned.

  • Define Valuation Variant for WIP and Scrap (optional)

    In the valuation variant for WIP and scrap you specify whether you want to calculate the target costs for the valuation of scrap variances on the basis of:

    • A preliminary cost estimate for the product cost collector or for the manufacturing order

    • An alternative material cost estimate

    • The currently valid standard cost estimate for the material

  • Define Target Cost Versions

    Assign a variance variant to the target cost version. Define how you want the target costs and the control costs to be calculated.

If you want to see input quantity variances and input price variances, set the Material Originindicator in the costing view of the material master record.

You must also check the following:

  • Be sure that the reporting point structure or milestone structure that you are using in production matches the reporting point structure or milestone structure used to calculate the target costs.

    For example, valuating the unplanned scrap on the basis of the standard cost estimate for the material may cause problems if the standard cost estimate is based on a different reporting point structure than that of the run schedule header.

    For scrap variances, the task list type, task list group, and group counter of the routing on which the calculation of target costs for the valuation of unplanned scrap is based must match the task list type, task list group, and group counter of the routing for which actual data were entered. Note also the capabilities of user-defined error management.

    Remember that if you change the milestone structure in order-related production and process manufacturing, you can no longer calculate scrap variances, or the calculated values will be inaccurate. Note also the capabilities of user-defined error management.

    In repetitive manufacturing, when you change the reporting point structure you can use flexible reporting points to convert the reporting point backflushes and update the preliminary cost estimate for the product cost collector.

    In repetitive manufacturing, SAP recommends the following:

    Note also the capabilities of user-defined error management.

  • Make sure that the cost estimate used to calculate the target costs has an itemization. For this reason you may need to create the following:

    • The standard cost estimate for the material with an itemization

    • The modified standard cost estimate for the material with an itemization

    • In sales-order-related production with a valuated sales order stock, the sales order cost estimate with an itemization

    Note Note

    If you want to valuate the unplanned scrap on the basis of a preliminary cost estimate for the production order or process order, the system generates an itemization dynamically when it calculates the variances.

    This reduces system performance.

    End of the note.

    Note Note

    You can calculate the variances on the basis of a unit cost estimate (such as a sales order cost estimate with a unit cost estimate, or a preliminary cost estimate for the production order without quantity structure).

    For the scrap variances to be calculated, the target costs must be based on a cost estimate with the costing method product costing (such as a sales order cost estimate with a unit cost estimate, or a preliminary cost estimate for the production order with quantity structure).

    End of the note.

You should also check the definition of the controlling area in Customizing for General Controlling:

The currency type of the controlling area (under Basic data) controls which currency is allowed as the controlling area currency and whether this currency can differ from the currency of the company codes assigned to that controlling area. You can use the All currencies indicator (under Control indicators) to specify whether the values are updated only in the controlling area currency or also in the transaction currency and the object currency.

If the company code currency is not the same as the controlling area currency, go into Customizing for Product Cost Planning under Selected Functions in Material Costing and carry out the step Activate Cost Component Split in Controlling Area Currency before you create the cost estimate on which target cost calculation is based. The system can only determine variances if you have performed this step.

Note Note

If you are using a valuated sales order stock and want to valuate on the basis of the standard cost estimate, the cost estimate for valuation is determined on the basis of a strategy sequence.

If you are using a valuated sales order stock and calculate the target costs using a sales order cost estimate, valuation is made using only the operational currency.

End of the note.

Take organizational steps to ensure that WIP is always calculated before the variances.

Manufacturing orders and product cost collectors are only included in variance calculation when the status of the order is not one of the following:

  • LKD (Locked)

  • CLSD (Closed)

  • DLFL (Deletion flag)

  • DLT (Deleted)

Note Note

You can significantly improve the performance of variance calculation by setting the status DLFL for orders that meet all of the following conditions:

  • The order is delivered or technically completed

  • Variances have been calculated for the order

  • You do not anticipate any further follow-up costs for the order

You can remove the deletion flag after it has been set, for example if follow-up costs are incurred for the order. The deletion indicator, however, cannot be removed.

End of the note.

You cannot calculate variances for periods for which a period lock for transaction KVAR (variance calculation) was set. This applies to both update runs and test runs.

Features

The variance calculation function always compares the control costs with the target costs. The system calculates the target costs and the control costs depending on the time period (periodic or cumulative) and on the type of variance calculation.

With all variance types with reference base actual (that is, in the standard system with target cost version 0, 1, 3) the control costs are the actual costs less the work in process and scrap variances. To enable the scrap variances to be deducted from the actual costs, the Scrap Variances indicator must be selected in the variance variant.

To be able to supply information under the original cost elements, when the system calculates the variances it compares the itemization of the cost estimate used to calculate the target costs with the line items in the actuals or with the itemization of the cost estimate used to calculate the control costs.

You can calculate variances in:

  • Product Cost by Period

    • For product cost collectors

    • For the cost object nodes in a cost object hierarchy

  • Product Cost by Order for manufacturing orders

In Product Cost by Period you determine the variances for each period separately.

In Product Cost by Order you determine the cumulative variance.

Periodic Variance Calculation

The periodic variance calculation process compares the target costs of the period with the control costs of the period.

The variances of the period are calculated in the following formula:

Actual Cost Debit – Allocated Actual Costs (Actual Cost Credit for Goods Receipt) – Target Costs = Variances + Scrap Variances + Work in Process

The order must have the settlement type PER (periodic).

With all variance types with reference base actual (that is, in the standard system with target cost version 0, 1, 3) the control costs are the actual costs less the work in process and scrap variances. To enable the scrap variances to be deducted from the actual costs, the Scrap Variances indicator must be selected in the variance variant.

You cannot calculate planning variances between the standard cost estimate for the material and the preliminary cost estimate for the product cost collector.

Special Requirements with Cost Object Hierarchies

There are two different ways of processing cost object hierarchies:

  • Cost object hierarchy with distribution

    The costs posted to the cost object nodes are distributed to the lowest nodes of the hierarchy (that is, to the single objects assigned to the cost object hierarchy, such as product cost collectors and manufacturing orders).

  • Cost object hierarchy without distribution

    The costs assigned to the cost object nodes are settled from the cost object hierarchy. There are two types of settlement: settlement by means of material account determination and settlement by means of manual account assignment. SAP recommends settlement by means of material account determination.

    See also: Settlement Rules for Cost Object Hierarchies

If you are using cost object hierarchies in Product Cost by Period, you always calculate the variances on the cost object hierarchy, regardless of whether you are using distribution or not. Even if you are using actual cost distribution and want to calculate the variances at the level of the assigned objects, you start variance calculation for the orders assigned to the cost object hierarchy (such as product cost collectors) by means of variance calculation for the cost object hierarchy. Orders assigned to a cost object hierarchy are not selected during variance calculation for the orders or product cost collectors.

Variance Calculation for Cost Object Hierarchies with Distribution

For information on variance calculation with cost object hierarchies with distribution, refer to the section Period-End Closing for Cost Object Hierarchies with Distribution.

Variance Calculation for Cost Object Hierarchies Without Distribution

When you calculate the variances for a cost object hierarchy without first distributing the actual costs, the system dynamically summarizes the costs in order to total the costs for all cost object nodes in the hierarchy.

The variance is reported at the highest node in the hierarchy for which costs were posted under a cost element.

When the variances are calculated on the basis of cost object nodes, the system compares the target costs with the control costs for each node of the hierarchy when it calculates the variances. The system performs the following actions dynamically when it calculates the variances for a cost object hierarchy:

  • It calculates and summarizes target costs at the order level.

    The target costs are calculated by converting the standard costs or the planned costs of the materials manufactured to the quantity of materials delivered to inventory, in dependency on the target cost version. The target costs are then summarized to the highest hierarchy node (cost object node plus the orders assigned to the cost object hierarchy) at which a cost element or cost element/origin group or cost element/origin was posted in the actuals.

  • It calculates and rolls up the transfer costs to each hierarchy node.

    Transfer costs are the control costs and remaining variances rolled upwards in the cost object hierarchy that were passed dynamically during variance calculation for a cost object hierarchy from lower-level nodes to the highest nodes at which a cost element or cost element/origin group or cost element/origin was posted in the actuals.

    Note Note

    The remaining variances that are rolled up are those in which variances were not assigned to any variance category (such as in dependency on the definition of the variance variant).

    The remaining variances that arise because no target costs could be calculated are not rolled up.

    End of the note.

    Example Example

    Actual costs in the amount of USD 100 are recorded under cost element 400000 for product cost collector number 700000 assigned to a cost object hierarchy. Actual costs in the amount of USD 10,000 are shown on the higher-level cost object node PG-BULB-COLOR under cost element 400000. The cost object node PG-BULB-COLOR is the highest hierarchy node at which actual costs of cost element 400000 were recorded.

    Variances are calculated for the cost object hierarchy without distribution.

    To make the example as simple as possible, we will assume that target costs, work in process, and scrap variances are all zero.

    The following values are shown in the detailed screen of the totals list for product cost collector 700000:

    • Actual costs (cost element 400000): USD 100

    • Control costs: USD 100

    • Allocated actual costs (cost element 895000): USD 20,000

    • Transfer costs (cost element 400000): USD 100

    • Variance (cost element 895000): USD 20,000

    The variance of cost element 400000 is not shown on this hierarchy node because the variances for this cost element are calculated on the basis of the data summarized on cost object node PG-BULB-COLOR.

    The following values are shown in the detailed screen of the totals list for cost object node PG-BULB-COLOR:

    • Actual costs (cost element 400000, posted directly to the cost object node): USD 10,000

    • Control costs: USD 10,000

    • Allocated actual costs: USD 0

    • Transfer costs (cost element 400000): USD 100

    • Variance (cost element 400000): USD 10,100

    While the transfer costs in the lower-level hierarchy node are not included in variance calculation, in the higher-level hierarchy node the transfer costs together with the control costs are compared with the target costs.

    End of the example.
  • The control costs are calculated for each cost object node or hierarchy node.

    With all variance types with reference base actual (that is, in the standard system with target cost version 0, 1, 3) the control costs are the actual costs less the work in process and scrap variances. To enable the scrap variances to be deducted from the actual costs, the Scrap Variances indicator must be selected in the variance variant.

    Work in process and scrap are also rolled up and deducted from the actual costs to calculate the control costs.

You can create a hierarchy with characteristics in Profitability Analysis that corresponds to the structure of the cost object hierarchy in Product Cost Controlling, and settle the variances to Profitability Analysis by variance category.

For information on cost object hierarchies without actual cost distribution, refer to the section Period-End Closing for Cost Object Hierarchies Without Distribution.

For information on settling cost object hierarchies with and without actual cost distribution, refer to the section Settling Cost Object Hierarchies: Scenario.

Cumulative Variance Calculation

Cumulative variance calculation compares the target costs with the cumulative control costs. Cumulative variance calculation is only possible if the following conditions are met:

  • The order has the settlement type FUL (full settlement).

  • The production order or process order has the status DLV (delivered) or TECO (technically completed).

The control costs are calculated as follows:

  • For the calculation of the total variance, the control costs are equal to the actual costs less the scrap variances.

  • For the calculation of the production variance, the control costs are equal to the actual costs less the scrap variances.

  • For the calculation of the production variance of the period, the control costs are equal to the actual costs less the scrap variances.

  • For the calculation of the planning variance, the control costs are equal to the planned costs of the manufacturing order.

Types of Variance Calculation

You can calculate the following variances:

  • Planning variances

  • Production variances

  • Total variance

Assignment of Variances to Variance Categories

The system compares the control costs against the target costs and assigns the resulting variances to variance categories. The variances are assigned to variance categories in the following sequence:

  1. Input price variance

  2. Resource-usage variance

  3. Input quantity variance

  4. Remaining input variance

  5. Mixed-price variance

  6. Output price variance

  7. Lot size variance

  8. Remaining variance

Periodic Variance Calculation

For product cost collectors and cost object hierarchies, you always calculate variances by period. You can also calculate variances by period for manufacturing orders. The default rule in the order type of the manufacturing orders must be PP2 (Production Material Periodic Settlement).

To analyze the results of variance calculation, you normally use the Product Cost Controlling Information System. First analyze the aggregated data, for example using a summarization hierarchy. To identify orders that caused unusually high variances, use the exception rules of the information system.If you want to have detailed information on an order that caused unusually high variances, return to the variance calculation function and recalculate the variances for the order as a test run. Set the Detail List indicator when you do this. The test run is then effectively used as a simulation mode.

Note that with periodic settlement of manufacturing orders WIP must be calculated at target costs. In this case, the task list type, task list group, and group counter of the routing used in the cost estimate that calculated the target costs for the valuation of work in process must match the task list type, task list group, and group counter of the routing specified in the manufacturing order. Milestone structures cannot be changed in the routing.

Using the Detail List

In the processing options, you specify whether you want to:

  • Execute variance calculation for the orders in the background

  • Execute variance calculation for the orders as a test run

  • Generate a detail list for each order

If you select the Detail List option, you first receive a list of all processed objects with the relevant values. From there you can go to detailed screens such as the explanation of the target costs or the explanation of the variances.

You normally execute variance calculation in the form of collective processing in the background. For performance reasons, SAP recommends that you do not select the Detail List indicator in collective processing. Even if the Detail List indicator is not set, the variances are still broken down into variance categories. These variance categories can be viewed in the information system.

To analyze the results of variance calculation, you normally use the Product Cost Controlling Information System. First analyze the aggregated data, for example using a summarization hierarchy. To identify orders that caused unusually high variances, use the exception rules of the information system. If you want to have detailed information on an order that caused unusually high variances, return to the variance calculation function and recalculate the variances for the order as a test run. Set the Detail List indicator when you do this. The test run is then effectively used as a simulation mode.

Update of Data by Currency

Variances are always calculated in the currency of the controlling area. If you have specified that update can also take place in the transaction currency and in the object currency for the controlling area, the system also calculates variances in the object currency. In this case the values are transferred to CO-PA in both currencies during settlement. In CO-PA you specify the currencies you want to use in the Profitability Analysis component.

Message Logs

Look at the messages under Start of the navigation path Goto Next navigation step Message Log End of the navigation path.

You can also:

  • Assign particular messages issued during variance calculation to areas of responsibility

    This allows you to sort the log by area of responsibility.

  • Define the meaning of particular messages (such as defining them as information, warning, or error messages)

    This enables you to control whether the message appears in the log and whether the order number appears in the worklist when the message is issued.

Improving Performance

You can use parallel processing to reduce the runtime of the variance calculation process. This applies both to variance calculation for orders (product cost collectors and manufacturing orders) and to variance calculation for cost object hierarchies.

  • If you perform variance calculation outside the Schedule Manager, enter a server group for background processing.

  • If you perform variance calculation using the Schedule Manager, set the Parallel processing indicator in the selection screen of the program when you create the job variant. An entry field then appears in which you enter the server group.

Schedule Manager: Multilevel Worklist

You can view and edit the objects with errors that were processed with the individual functions. You use the multilevel worklist for this purpose. The multilevel worklist enables you to edit faulty objects of an individual processing step (that is, a single function) or of an entire processing step sequence.

A prerequisite for using the multilevel worklist is that you are using the Schedule Manager in conjunction with a flow definition.

See Integration in this section.

User-Defined Error Management

You can influence the messages output in the log of variance calculation by using user-defined error management.

See Integration in this section.

Variances in the Information System

If the variances were calculated in a target cost version relevant to settlement, the order receives the status VCAL (Variances calculated). You can include this status in the definition of the status profile in Customizing for the Product Cost Controlling Information System.

You can view the data calculated in variance calculation in the Product Cost Controlling Information System for each manufacturing order or product cost collector.

More Information

For information on the deletion flag, deletion indicator, and period lock, refer to the following sections:

Reorganization of Manufacturing Orders

Reorganization of Product Cost Collectors

For information on the special features of variance calculation and scrap calculation with a valuated sales order stock, refer to the following section:

Variances with a Valuated Sales Order Stock

For information on target cost versions, refer to the IMG for Product Cost by Period and Product Cost by Order under Start of the navigation path Period-End Closing Next navigation step Variances End of the navigation path.

For information on the information system, see the document Product Cost Controlling Information System.

For information on additional performance improvements in CO-PC, see the section Performance in Product Cost Controlling.