Symptom
- Creating an operation component allocation for a component inside a phantom assembly via API_PRODUCTION_ROUTING fails.
- API response contains code "CPCC_DM/002" with message "No suitable object found".
- OData error log shows HTTP 400 with message "Changes discarded due to errors" (message class/key CPCC_DM060).
- Issue occurs when passing the phantom component along with the finished good (root) BOM context.
Environment
- SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Call API_PRODUCTION_ROUTING (version 0003), entity ProductionRoutingOperation and navigate to association to_OpCompAlloc to create an operation component allocation.
- Post a payload to allocate a component that belongs to a phantom assembly while linking it to the finished good’s (root) BOM.
- Provide fields such as BillOfMaterialCategory, BillOfMaterial, BillOfMaterialComponent, BillOfMaterialVariant, BillOfMaterialItemNodeNumber, BillOfMaterialRootCategory, BillOfMaterialRoot, BillOfMaterialRootVariant, and MatlCompIsMarkedForBackflush, but omit BillOfMaterialHierarchyLevel and BillOfMaterialHierarchyPath.
- Observe the response containing code "CPCC_DM/002" and message "No suitable object found", and an OData 400 "Changes discarded due to errors".
Cause
The payload for allocating a phantom subcomponent did not include the required fields BillOfMaterialHierarchyLevel and BillOfMaterialHierarchyPath, which are necessary to identify the subcomponent within the BOM hierarchy.
Resolution
- When allocating a component that resides within a phantom assembly, include the hierarchy-identifying fields BillOfMaterialHierarchyLevel and BillOfMaterialHierarchyPath in the payload sent to API_PRODUCTION_ROUTING.
- Set BillOfMaterialHierarchyLevel and BillOfMaterialHierarchyPath to the correct values that represent the path from the root BOM to the target phantom subcomponent so it can be uniquely identified.
Keywords
API_PRODUCTION_ROUTING, ProductionRoutingOperation, to_OpCompAlloc, phantom assembly, phantom component, component allocation, BOM hierarchy, BillOfMaterialHierarchyLevel, BillOfMaterialHierarchyPath, CPCC_DM/002, no suitable object found, CPCC_DM060, OData 400, routing, public cloud , /ProductionRoutingOperation /to_OpCompAlloc , POST , KBA , PP-BD-RTG-2CL , Routing (Public Cloud) , How To
SAP Knowledge Base Article - Public