cancel
Showing results for 
Search instead for 
Did you mean: 

API_MATERIAL_DOCUMENT_SRV gives error when performing GR for production order

SunnyCH
Explorer
537

Hi,

During testing API_MATERIAL_DOCUMENT_SRV (https://api.sap.com/api/API_MATERIAL_DOCUMENT_SRV/overview) with POST method and the following body in Postman in the public cloud partner demo system:

{ "GoodsMovementCode": "02", "to_MaterialDocumentItem": { "results": [ { "Material": "FG400", "Plant": "2510", "StorageLocation": "251B", "Batch": "ORDERTEST3", "GoodsMovementType": "101", "ManufacturingOrder": "1000025", "ManufacturingOrderItem": "1", "EntryUnit": "PC", "QuantityInEntryUnit": "9" } ] }}

Postman gives following error: Update control of the movement type is incorrect (entry 101 X X). This lead me to KBA2591157, there I found out LOG_MM_OM_1 needs to be active. To double check this, i did a 2nd test in another system (private cloud), where LOG_MM_OM_1 is active. However when testing API, the same error returned.

To be able to understand why, i tested BAPI_GOODSMVT_CREATE, there manually entered variable "MVT_IND = F", after this action, API was exposed successfully.

The question is, there is no field called "MVT_IND" in API_MATERIAL_DOCUMENT_SRV. Did I miss something, or is this field called another name in this API?

Note: this test works perfectly in the front-end both in private and public cloud system. Error only occurs when testing API.

Many thanks in advance for your help!

Accepted Solutions (1)

Accepted Solutions (1)

SunnyCH
Explorer
0 Kudos

Solved by adding field to body: "GoodsMovementRefDocType": "F".

Answers (0)