Function documentationVariance Calculation

 

The variance calculation function provides you with the information you need before you can take steps to improve your cost situation. It supplies detailed cost information on the following objects:

  • Product cost collectors

  • Manufacturing orders (production orders or process 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 variances are updated by object for each cost element, or for each cost element and origin.

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.

User-Defined Error Management

You can influence the messages output in the log of variance calculation with user-defined error management. For more information, see User-Defined Error Management in Cost Object Controlling.

Note Note

User-defined error management is not available in HANA-based collective processing.

End of the note.

Prerequisites

The following activities need to be carried out before you can calculate variances.

Customizing

Check the settings for the settlement rule of the objects for which you are calculating variances. Variances can be calculated by period or cumulatively; this is controlled by the default rule in the order type.

  • 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 Start of the navigation path Cost Object Controlling Next navigation step Product Cost by Period Next navigation step Product Cost Collectors Next navigation step Define Cost-Accounting-Relevant Default Values for Order Types and Plants End of the navigation path.

  • 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.

The following settings are required 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 value the unplanned scrap during variance calculation, select the Scrap indicator.

  • Define Default Variance Keys for Plants

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

  • Check Variance Variants

    Select the Scrap Variance 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 (Target Costs) (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

    • 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.

Variance Key Assignment

Make sure that a valid variance key is assigned to the manufacturing order or product cost collector for which you want to calculate variances.

Cost Estimate Itemization

An itemization must exist for the cost estimate used to calculate the target costs. 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

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.
Entity Names

To ensure accurate results, make sure that entities such as materials, plants, activity types, or business processes involved in variance calculation do not have the character "/" in their name.

Material Component Assignment

The material components listed in the BOM of the cost estimate used to calculate the target costs must be 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.

Note Note

Only operation sequence 0 can be used to calculate the scrap.

End of the note.
Order Status

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

The variance calculation process 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.

Material Origin

The Material Origin indicator in the costing view of the material master record must be selected for all cost-critical material components, or if you want input quantity variances and input price variances to be calculated. Otherwise you need to use origin groups.

The Material Origin indicator enables the determination of 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

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.
Requirements for Total Variance

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.

Fiscal Year

The fiscal year must be the same as the calendar year.

Cost Estimate for Current Standard Price

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 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

Reporting Point Structure

Make sure 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, valuing 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 Note

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.

End of the note.

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:

  • Create a separate product cost collector for each production version.

  • Create a preliminary cost estimate for the product cost collector.

  • Have the activity quantities that are to be confirmed defaulted on the basis of the routing used for the preliminary cost estimate.

  • Value the work in process and unplanned scrap on the basis of the preliminary cost estimate for the product cost collector.

  • If the reporting point structure is changed, use flexible reporting points and update the preliminary cost estimate.

Controlling Area Definition

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 valuation to be based on the standard cost estimate, the cost estimate used 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 takes place in operational currency only.

End of the note.
Order Status

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

  • LKD (Locked)

  • CLSD (Closed)

  • DLFL (Deletion flag)

  • DLT (Deleted)

Note Note

You can 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. 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.

Calculate WIP Before Variances

Take organizational steps to ensure that work in process is always calculated before the variances.

Features

Variance calculation always compares the control costs with the target costs. Target costs and control costs are calculated 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 provide information under the original cost elements, variance calculation 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.

Note Note

Only target costs and control costs are updated to the database. Other calculation values, such as control costs, are not updated to the database.

End of the note.

You can calculate variances in:

  • Product Cost by Period for product cost collectors

  • 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.

Note Note

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

End of the note.
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 Variances

You can calculate the following types of variances:

  • Planning variances

  • Production variances

  • Total variance

Variance Categories

The control costs are compared with the target costs and the resulting variances are assigned 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, 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. Select the Detail List indicator when you do this. The test run is then effectively used as a simulation mode.

Note Note

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.

End of the note.
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 indicator, 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 not selecting Detail List in collective processing. Even when Detail List is not selected, the variances are still broken down into variance categories.

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. Select the Detail List indicator when you do this. The test run is then effectively used as a simulation mode.

Currencies

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, variances are also calculated in 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.

Note Note

Conversion into object currency is not supported if you are using a quantity-based overhead rate. In this case you need to configure the amount using the controlling area currency.

End of the note.
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.

  • 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.

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.

Limitations

Note Note

  • Entities such as materials, plants, activity types, or business processes involved in variance calculation must not have the character "/" in their name.

  • Variance calculation does not support ABAP code extension functionalities (such as user exits, BAdIs, or modifications).

End of the note.

More Information

Scrap Variance

Preliminary Costing of Product Cost Collectors

User-Defined Error Management in Cost Object Controlling

Flexible Reporting Points

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

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, refer to the document Product Cost Controlling Information System.

For information on additional performance improvements in CO-PC, refer to Performance in Product Cost Controlling.