cancel
Showing results for 
Search instead for 
Did you mean: 

Component with negative quantity missing in API PlannedOrderComponents

09-28-2026 6:33 PM
giustina_nocera Discoverer
167 views 3 comments
0 Likes
Subscribe

Hello team,

I would ask you kindly if it is normal behavior that during creation of planned order via API from external system to SAP (POST method) there is a missing component in the payload (xml file).

The planned order is relevant for REM process and the BOM contains co-products.

There is one tag A_PlannedOrderComponentType for component P-0000000260 while is missing the co-product component L-2000020.

I checked configuration about REM and it is ok, I tried to find some details on several forums and maybe component with negative required quantity is not considered during API execution?

CS03 with material L-2000022, plant ARB0 and usage 1.

If you need more details let me know.

Thanks,

Giustina

0 Likes

Accepted Solutions (0)

Answers (2)

Answers (2)

giustina_nocera
Discoverer
The SAP expert has already provided feedback. Thank you very much.
ElenaPuica
Active Contributor
0 Likes

Hi @giustina_nocera ,

I would first clarify whether the XML you are referring to is the POST request sent by the external system or the response/read result returned by SAP, because this determines where the issue needs to be investigated.

  1. If you are using “Create Planned Order with Components”

According to SAP Help for Create Planned Order with Components, the POST request must contain both the planned order properties and the component properties in the same request.

For each component, SAP documents:

  • Material - mandatory
  • GoodsMovementEntryQty - mandatory
  • the component must be a stock item (BOMItemCategory = L) or non-stock item (BOMItemCategory = N), depending on the material settings.

Therefore, if L-2000020 is already missing from the POST request, I would first check the external system/interface that builds the request.

In this scenario, the fact that the material exists as a co-product in the BOM in CS03 does not by itself mean that it was supplied as a component in the API request.

SAP Help:
APIs for Manufacturing → Planned Order (OData V4) → Create Planned Order with Components
https://help.sap.com/docs/SAP_S4HANA_CLOUD/d35113ee62644d3abee1aaec148291d9/307f266c0fcc44e3a53f5e2a...

  1. SAP also supports creation with automatic BOM explosion

There is a second API scenario that is important to distinguish.

SAP documents that when a planned order is created without adding components to the request, the system determines the components automatically by performing a BOM explosion.

So the Planned Order API supports both:

  • Create without components → SAP determines components automatically through BOM explosion.
  • Create with components → component properties are supplied in the POST request.

SAP Help:
Create Planned Order
https://help.sap.com/docs/SAP_S4HANA_CLOUD/d35113ee62644d3abee1aaec148291d9/f92b46872df54aa79ca7c200...

SAP also summarizes both supported operations in the main Planned Order (OData V4) API documentation:

https://help.sap.com/docs/SAP_S4HANA_CLOUD/d35113ee62644d3abee1aaec148291d9/a3647ff7717044128f7c42d1...

If you are actually relying on automatic BOM explosion rather than supplying the components explicitly, also check the ProductionVersion.

SAP KBA 3758715 – Component missing when creating planned order via API_PlannedOrder documents a Public Cloud scenario where components are missing because ProductionVersion was not supplied in the POST payload. As a result, BOM explosion did not take place.

SAP KBA 3758715: https://userapps.support.sap.com/sap/support/knowledge/en/3758715

  1. Regarding the negative quantity / co-product

I could not find anything in the SAP S/4HANA Cloud Public Edition documentation for API_PlannedOrder stating that a component is excluded simply because GoodsMovementEntryQty is negative.

For Create Planned Order with Components, SAP documents GoodsMovementEntryQty as mandatory, but does not document a positive-only restriction. I also could not find a documented restriction or explicit support statement specifically for co-products with negative quantities in this API operation.

Therefore, I would not assume yet that the negative quantity is the reason why L-2000020 is missing.

I would check the following:

  1. Is L-2000020 present in the actual POST request?
  2. Which BOMItemCategory is used for it?
  3. Which GoodsMovementEntryQty is sent?
  4. Are you creating the planned order with explicitly supplied components, or relying on automatic BOM explosion?
  5. If L-2000020 is sent with a negative quantity, what HTTP status and SAP message are returned?

If the co-product is present in the POST request with the expected component data but SAP rejects or omits it specifically when the quantity is negative, I would raise an SAP incident, because I could not find this behavior documented as a restriction of the Planned Order API.

Best regards,
Elena