One of the neat blogs, I have ever seen in UI5! Well done! I was missing out this thing only.
Now I am successfully able to post data through both GW client and UI5 page with your code in CREATE_ENTITYSET method:
INSERT zuserinfo FROM ls_userinfo.
IF sy-subrc = 0.
er_entity = ls_request_input_data."Fill Exporting parameter ER_ENTITY
But previously I was using "Map to datasource" and I think I wasn't doing proper mapping.
And I want the newly created entry to be shown in the output immediately without a need for refresh. Is it possible using the below code:
document.location.reload(true);
$("<div>Returned data " + window.JSON.stringify(data) + "</div>").appendTo($("#MessageDiv"));
},
function (err)
{
$("<div>Returned error " + window.JSON.stringify(err.response) + "</div>").appendTo($("#MessageDiv"));
}
Thanks a lot Chandra for your help. Well done once again :-)