on 2018 Dec 14 9:36 AM
Hi Expert,
I was looking at this great blog https://blogs.sap.com/2016/02/15/introduction-odata-batch-processing-with-content-id-in-sap-gateway by Kenichi Unnai, then I was trying to create the UI5 code to simulate normal payload (i.e.: $1/Nav), but I have some problem.
oModel.createEntry("/HeadSet", {
"groupId": "foo",
"headers":{"Content-ID":1},
properties: aHead
});
.....
oModel.createEntry("$1/HeadItemNav", { <-- ERROR HERE: No Metadata for collection found
"groupId": "foo",
properties: aItem
});
..... NOTE: HeadItemNav is linked to ItemSet
oModel.submitChanges({
"groupId": "foo",
success: function(oData){
MessageToast.show("SUCCESS");
},
error: function(oError){
MessageToast.show("ERROR");
}
});
Meanwhile if I just use like below, it got through, but I have a difficulty in getting pushing in value for IT_OPERATION_INFO-CONTENT_ID_REF in CHANGESET_BEGIN.
oModel.createEntry("/ItemSet", { <-- this got through to CHANGESET_BEGIN
"groupId": "foo",
"headers":{"Content-ID-Ref":1}, <-- This Does not seem to pass to CONTENT_ID_REF
properties: aItem
});
How do I pass value to IT_OPERATION_INFO-CONTENT_ID_REF I wonder? Appreciate your expertise and advice on this matter
Best Regards
Andre Julius
Hi Andre,
The "Content-ID" you are passing is incorrect. it should be "content-ID" and It should work for normal "create" but not sure if it works for "createEntry".
"headers": {
"content-ID": 1
}
Let me know if you get any issues.
I am not sure why "$1/Nav" is not working, not even sure if ui5 supports it(Never tried 😞 ).
Instead you can use the deep structure format to send the data, but you might have to call "Create" function for this and you will be able to get the data in deep format in changesetprocess method.
** UPDATE **
you need to mention "/$1/navigation" . you missed the '/' before the content id.
BR,
Mahesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
62 | |
12 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.