Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3655

How to call OData service using a destination?

$
0
0

New to JavaScript and SAPUI5; struggling to find syntax explanation.

Need to call an OData service in on-premise systems. The SAP project template already put seemingly correct dataSources section in manifest.json. How do I call it from controller.js? The Northwind example in the tutorial(s) doesn't make it clear.

Simple here, not selecting or bringing back any data. Take a string from a user input field and pass it to the URL/OData service. Not validating the string and not looking for the service call output. In such a simple scenario, do I need to declare and use a model, var oModel = new sap.ui.model.json.JSONModel("https.... ?

Do I need/want a button with an event and then some function(evt)? The button examples in documentation are too few.

Or should I bypass destination configuration/dataSources declaration and call sap.m.URLHelper.redirect?

url = "something_reachable/path"sap.m.URL.redirect (url +"input string", false);  

//false = for now don't care to see what happens after the call.In preview application the service call didn't get triggered.


Viewing all articles
Browse latest Browse all 3655

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>