Soufiane.F
Set Header Delivery Note/Reference field in API Material Documents Create
Soufiane.F · over 1 year ago · Question
Answered
Soufiane.F

Hello Community,

We have a requirement where we need to create a PO and its Goods Receipt. We created a specific iFlow using both APIs ( API_PURCHASEORDER_PROCESS_SRV/A_PurchaseOrder and API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHeader) and managed to get the flow work.

The problem we are facing is that in the created Material document we cannot set the Delivery Note/Reference. Following error is returned : Field ReferenceDocument cannot be set for this operation on header level.

Is there any solution to set that field ?

Here is the payload :

{

    "PostingDate": "2019-06-01T00:00:00",

    "MaterialDocumentHeaderText": "Reference XXXX",

    "ReferenceDocument": "My Delivery", <------------------ when this field is removed the GR is created

    "GoodsMovementCode": "01",

    "to_MaterialDocumentItem": [

        {

            "Material": "300204",

            "Plant": "1000",

            "StorageLocation": "",

            "GoodsMovementType": "101",

            "PurchaseOrder": "4500001709",

            "PurchaseOrderItem": "90010",

            "GoodsMovementRefDocType": "B",

            "MaterialDocumentItemText": "",

            "EntryUnit": "ROL",

            "QuantityInEntryUnit": "1"

        }        

    ]

}

Thank you

Comments

Comments
Alumni