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
- Copy standard movement type 201 to Zxx.
- Use API for reservation creation.
- Maintain "CostCenter" property in API payload header level.
- 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:
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
SAP Knowledge Base Article - Public