Symptom
- use the API API_MATERIAL_DOCUMENT_SRV to do a transfer posting of project stock from one plant to another plant using movement type 301 / Q, getting an error "Stock data of serial number 18 not suitable for movement"
- same error happens for the same material, serial number 17,19
Environment
SAP S/4HANA Cloud Public Edition
Transfer posting using API
Reproducing the Issue
- Transfer posting in MIGO for the same material: Test_AAA, FROM: plant: 101 , storage location: 101W to plant: 102 , storage location: 102W special stock Q, serial number 18. -- post in MIGO works without error.
- Attempt to perform a transfer posting of project stock from one plant to another plant using movement type 301 / Q via API API_MATERIAL_DOCUMENT_SRV.
- Observe the error message "Stock data of serial number 18 not suitable for movement".
- the payload used in API:
{
"GoodsMovementCode": "04",
"PostingDate": "/Date(xxxxxxx)/",
"MaterialDocumentHeaderText": "Test_Transferposting",
"to_MaterialDocumentItem": {
"results": [
{
"Material": "Test_AAA",
"Plant": "102",
"StorageLocation": "102W",
"GoodsMovementType": "301",
"InventorySpecialStockType": "Q",
"IssuingOrReceivingPlant": "101",
"IssuingOrReceivingStorageLoc": "101W",
"SpecialStockIdfgWBSElement": "Mxxxxxxx",
"EntryUnit": "EA",
"QuantityInEntryUnit": "1",
"SerialNumbersAreCreatedAutomly": false,
"to_SerialNumbers": {
"results": [
{
"SerialNumber": "18"
}
]
}
}
]
}
}
Cause
from plant/storage location & destination plant/storage location filled in the wrong API properties/parameters.
Resolution
- "Plant"/"StorageLocation" these properties stands for the current plant/storage location info the the transferred material.
- Adjust the payload parameters as follows:
"Plant": "102", >>>>>>>>>>>> change from 102 to 101
"StorageLocation": "102W", >>>>>>>>>>>> change from 102W to 101W
"GoodsMovementType": "301",
"InventorySpecialStockType": "Q",
"IssuingOrReceivingPlant": "101", >>>>>>>>>>>>>change from 101 to 102
"IssuingOrReceivingStorageLoc": "101W", >>>>>>>>>>>>>change from 101W to 102W
3. Test the adjusted payload to ensure the error is resolved.
See Also
Refer to: Document Items | SAP Help Portal
Keywords
API_MATERIAL_DOCUMENT_SRV, stock data, serial number, transfer posting, movement type 301 / Q, SAP S/4HANA Cloud Public Edition, error message, Goods Issue and Return Delivery, payload adjustment, IM stock, SN stock, project stock , KBA , MM-IM-GI-2CL , Goods Issue and Return Delivery (Public Cloud) , Problem