Skip to Content
avatar image
Former Member

Kapsel Offline Batch - (with Content-ID) - error : Unhandled payload type

Hi Experts,

I am trying to make a batch call against the offline store using content-id referencing (for linking order header with items). When I make the call for only the headers (without content-id) the request and flush execute correctly.
It is only when using content-id I am facing this issue.
Below is the payload that is being used :
function: batchCreateAndUpdate() {

var oHeaders = {};
var params = { __batchRequests:
[{ __changeRequests:
[{ requestUri: getEndPointURL() + "/OrderSet", method: "POST",
headers: { "Content-ID": "1" },
data: { "Vbeln": "23456", "Vkorg": "IN09", "Vtweg": "80", "Spart": "00", "Vdatu": "2017-06-30", "Netwr": "18369.500", "Waerk": "INR", "Kunag": "9067906", "Kunwe": "9067906", "Kunrg": "9067906", "Ernam": "ENEVS" } },

{ requestUri: "$1/toOrderItems", //toOrderItems
method: "POST",
data: { "Vbeln": "23456", "Posnr": "000010", "Posex": "", "Matnr": "79723407", "Kwmeng": "1.000", "Vrkme": "CTN", "Netpr": "18369.500", "Waerk": "INR", "Vdatu": "2017-06-30", "Status": "new", "Netwr": "18369.500", "Meins": "CAR" }
}]
}] };

oHeaders['Authorization'] = authStr;

var request = { headers: oHeaders, requestUri: getEndPointURL() + "/$batch", method: "POST", data: params };
OData.request(request, batchCallbackSuccess, errorCallback, OData.batchHandler);
}

Both the header and items entities are in the defining requests. toOrderItems is the navigation name used as requesturi of the 2nd record for referencing the header.

The error that pops up on making this request is : Unhandled payload type.


Please suggest where I must be going wrong ?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jul 09, 2017 at 09:09 AM

    Issue solved by upgrading to latest SMP SDK 3.0 SP 13 PL04 ! Thanks!

    Add comment
    10|10000 characters needed characters exceeded