SAP Knowledge Base Article - Public

3703660 - Error "Field CostCenter cannot be set at the header level for goodsmovementtype Zxx" occurs when using API_RESERVATION_DOCUMENT to create reservation.

Symptom

When using OData V2 API API_RESERVATION_DOCUMENT to create reservation, get error message: "Field CostCenter cannot be set at the header level for GoodsMovementType Zxx".

Environment

S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Copy standard movement type 201 to Zxx.
  2. Use API for reservation creation.
  3. Maintain "CostCenter" property in API payload header level.
  4. Encounter error: "Field CostCenter cannot be set at the header level for GoodsMovementType Zxx".

Cause

The V2 OData API API_RESERVATION_DOCUMENT does not support custom movement types.

Resolution

Use the OData V4 API API_RESERVATION_DOCUMENT for reservation creation, which supports custom movement types.

Below URL provide the sample code for creating reservations using OData V4 API:

Help Portal - Reservation Document (A2X)

Keywords

reservation creation, custom good movement type, OData V2, OData V4, API_RESERVATION_DOCUMENT , KBA , MM-FIO-IM-RSV-2CL , Fiori UI for Reservations (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions