Hello,
I am trying to create a simple application to approve or reject activities. For the purpose I created two function imports (Approve & Reject) in the Data Model of the oData service. I can access these imports successfully via the SAP Gateway Client and I think it all looks good on the server side.

However on my SAP UI5 Application, I am trying to send POST request to any of these services, but it doesn't work:
this.getModel().create("/Approve", oEntry, {
method: "POST",
success: function(data) {sap.ui.commons.MessageBox.alert("Success!");},
error: function() { sap.ui.commons.MessageBox.alert("Error!"); }
});
I see in the debugger that the post request is sent to /$batch instead of /Approve as I expected.

I guess I can use the standard REST Update function in order to accomplish the task, but I'd prefer to find a way to implement it this way.
So does anyone have an idea how can this be done?
Thanks,
Martin
Add comment