SAP Knowledge Base Article - Public

3786897 - Component Allocation to a Phantom Assembly using API_PRODUCTION_ROUTING returns "no suitable object found" - SAP S/4HANA Cloud Public Edition

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

  1. Call API_PRODUCTION_ROUTING (version 0003), entity ProductionRoutingOperation and navigate to association to_OpCompAlloc to create an operation component allocation.
  2. Post a payload to allocate a component that belongs to a phantom assembly while linking it to the finished good’s (root) BOM.
  3. Provide fields such as BillOfMaterialCategory, BillOfMaterial, BillOfMaterialComponent, BillOfMaterialVariant, BillOfMaterialItemNodeNumber, BillOfMaterialRootCategory, BillOfMaterialRoot, BillOfMaterialRootVariant, and MatlCompIsMarkedForBackflush, but omit BillOfMaterialHierarchyLevel and BillOfMaterialHierarchyPath.
  4. 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

  1. 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.
  2. 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

Product

SAP S/4HANA Cloud Public Edition all versions