Formula calculation loses precision with decimal rounding in cost estimation

Our cost formulas in SAP PLM 2021 Formula Management are producing inaccurate results due to decimal rounding issues. We have multi-step formula chains where intermediate calculations are being rounded prematurely, causing the final cost estimation to be off by significant amounts (sometimes 5-8% error on large orders).

The formula configuration shows:


FORMULA_STEP_1: material_cost * quantity (ROUND 2)
FORMULA_STEP_2: step_1_result * overhead_rate (ROUND 2)
FINAL_COST: step_2_result + fixed_costs

We need the intermediate calculations to maintain higher precision (at least 4 decimal places) and only round the final result. The decimal precision settings in the formula configuration seem to be applying rounding at each step. How can we configure the Formula Engine to preserve precision through the calculation chain?

Let me provide a comprehensive solution addressing all the precision-related focus areas:

Decimal Precision Configuration in Formula Settings: Navigate to your Formula Type configuration in the Formula Management customizing. Set the ‘Default Calculation Precision’ to 6 decimal places. This is the master setting that controls precision for all formulas of this type. Additionally, in the formula step properties, ensure that ‘Use Type Precision’ is enabled rather than ‘Use Currency Precision’. This prevents the system from automatically applying currency-based rounding (typically 2 decimal places).

Rounding Function Placement in Formula Chains: Restructure your formula to apply rounding ONLY at the final step:


STEP_1: material_cost * quantity (NO ROUND)
STEP_2: step_1_result * overhead_rate (NO ROUND)
FINAL: ROUND(step_2_result + fixed_costs, 2)

The key is to let intermediate calculations maintain full precision and apply rounding as the last operation. If you need to display intermediate values in reports, create separate display-only variables that round the intermediate results without affecting the calculation chain.

Intermediate Calculation Precision Handling: Change ALL intermediate variable definitions from DECIMAL(15,2) to DECIMAL(15,6). This is crucial. The variable data type determines the maximum precision that can be stored, regardless of formula settings. In the formula step editor, verify that each intermediate variable has ‘Precision Override’ set to 6 decimal places. Also check the formula context settings - there’s a global precision parameter that can limit intermediate precision even when variables are defined with higher precision.

Cost Estimation Accuracy Validation: Implement a two-phase validation approach. First, add a validation step in your formula that compares the calculated result against expected ranges. Second, configure the Formula Engine’s built-in variance checking feature. In the formula type customizing, set ‘Maximum Allowed Variance’ to 1% and enable ‘Variance Alert’. This will flag calculations where precision loss causes results to deviate from expected values. Create a custom report using table FORMULA_RESULTS to periodically audit calculation accuracy and identify formulas that consistently show precision issues.

After making these changes, regenerate all affected formulas and run comprehensive testing with known input values. Document the before/after results to validate that precision is now maintained throughout the calculation chain. The 5-8% error you’re experiencing should be completely eliminated with proper precision configuration.


This draft is based on general SAP PLM knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.

The rounding behavior you’re describing is controlled by the formula step configuration. In the Formula Management customizing (transaction code specific to your PLM version), you need to set the ‘Intermediate Calculation Precision’ parameter. By default, each formula step applies rounding based on the currency decimal places. You can override this by setting a higher precision value at the formula chain level rather than at individual step level.

I encountered this exact issue last year. The problem is that the ROUND function in your formula steps is being applied immediately. You should remove the explicit ROUND statements from intermediate steps and only apply rounding in the final calculation step. The Formula Engine will maintain internal precision if you don’t force rounding. Also check the data type of your formula variables - they should be defined as DECIMAL with sufficient precision, not as CURRENCY type which automatically rounds.

Thanks for the input. I tried removing the ROUND functions from the intermediate steps, but the system still seems to be rounding. I checked the variable data types and they’re defined as DECIMAL(15,2). Should I increase the decimal places to DECIMAL(15,4) for intermediate calculation variables? Also, where exactly in the customizing can I find the ‘Intermediate Calculation Precision’ parameter?

Yes, absolutely change your intermediate variables to DECIMAL(15,4) or even DECIMAL(15,6) for maximum precision. The variable data type definition is critical here. In the formula customizing, you’ll find precision settings under the Formula Type configuration. Navigate to the formula type master data and look for the ‘Calculation Precision’ field. Set it to at least 4 decimal places. This will override the default currency-based rounding for all formulas of that type. Make sure to test thoroughly after the change because it will affect all existing formulas using that formula type.

Tested this on SAP PLM 7.02 — setting ‘Default Calculation Precision’ to 6 decimal places in Formula Type customizing eliminated our intermediate rounding errors in multi-step cost formulas.

Don’t forget about the cost estimation accuracy validation aspect. After you fix the precision settings, you should implement validation rules to verify that your calculated costs fall within acceptable tolerance ranges. We use a custom validation BAdI that compares formula results against historical averages and flags any calculations that deviate beyond our threshold. This helps catch precision issues before they impact actual cost estimates that go to customers.

Another consideration: if your cost formulas integrate with external systems or pull data from other SAP modules, verify that the data interfaces are also configured for sufficient precision. I’ve seen cases where the formula precision was correct but the input data was already rounded by the source system. Check the data transfer structures and mapping rules to ensure decimal precision is preserved throughout the entire data flow from source to formula calculation.