SAP Knowledge Base Article - Public

3352378 - Sample payload for API API_MATERIAL_DOCUMENT_SRV to post movement type 161 for blocked stock

Symptom

You would like to know how to use API API_MATERIAL_DOCUMENT_SRV to post return movement type 161 for blocked stock.

Environment

S/4HANA Cloud system all version

Reproducing the Issue

1. Create a PO and add a material with Returns Item indicator checked.

2. Call API to post goods movement type 161 with this PO.

Resolution

Here is the sample payload:

{
    "PostingDate": "2023-07-04T00:00:00",
    "GoodsMovementCode": "01",
    "to_MaterialDocumentItem": {
        "results": [
            {
                "Material": "TG33",
                "Plant": "1010",
                "StorageLocation": "101A",
                "GoodsMovementType": "101",
                "PurchaseOrder" : "4500004321",
                "PurchaseOrderItem": "10",
                "GoodsMovementRefDocType": "B",
                "QuantityInEntryUnit": "1",
                "Supplier": "0010000012",
                "EntryUnit" : "PC",
                "InventoryUsabilityCode": "3"
            }
        ]
    }
}

See Also

API_MATERIAL_DOCUMENT_SRV, blocked stock, 161, 101, InventoryUsabilityCode, MIGO

Keywords

KBA , MM-IM-GF-2CL , Basic Functions (Public Cloud) , How To

Product

SAP S/4HANA Cloud Public Edition all versions ; SAP S/4HANA Cloud all versions