Cost rollup process fails after upgrade: cost calculation errors in multi-level BOMs

We upgraded our production environment to TC 12.3 last week and immediately ran into issues with cost rollup calculations. The process completes without errors in the logs, but the rolled-up costs are significantly off - sometimes by 30-40%.

The problem appears most severe in multi-level BOMs (5+ levels deep) where we have multiple cost elements mapped. When I validate the cost element mapping against our pre-upgrade configuration, everything looks correct in the preferences. However, the BOM structure integrity seems questionable - some child components show null cost values even though they have valid cost sheets attached.

Here’s what I’m seeing in the cost calculation service:

CostElement element = cost.getCostElement();
if (element == null || element.getValue() == null) {
    logger.warn("Null cost element at level: " + depth);
}

Has anyone dealt with cost rollup failures post-upgrade? I’m particularly concerned about whether our data migration scripts properly handled the cost element relationships. Any insights on validating BOM structure integrity after major version upgrades would be appreciated.

Focus on the linkage issues first - they’re your root cause. The upgrade migration scripts in 12.3 have a known limitation with complex cost structures. They don’t always preserve the bidirectional references between cost sheets and BOM lines when custom cost elements are involved. Before you start bulk operations, export your current cost structure configuration as a baseline. Then use the Cost Management API to rebuild the linkages programmatically. I’d recommend processing in batches of 50-100 components to avoid transaction timeouts.

The null value check you’re doing is good, but you also need to verify the cost element mapping at the BOM structure level. In 12.3, there’s a new validation step that checks parent-child cost element compatibility. If a parent has cost element A but the child only supports element B, the rollup will skip that branch and you’ll see those discrepancies. Your 30-40% variance suggests multiple branches are being skipped. Check the cost element definitions in your business modeler - they might have lost their inheritance rules during migration.

This happened to us during our 12.2 to 12.3 migration. The cost rollup engine changed how it handles inherited cost elements in 12.3. Check your upgrade logs specifically for warnings about cost element mapping transformations. We had to manually remap about 15% of our cost structures because the migration script didn’t preserve custom cost element attributes. The BOM integrity check should be your first step - use the OOTB validation utility in Cost Management to identify disconnected relationships.