on 07-03-2018 8:50 AM
Any Sample code of accessing OData services of ES5 from client side html page, without bypassing corporate internet security
Is it possible to share sample code of accessing OData services of ES5 system,
using a single html page,
without bypassing corporate internet security.
Tried using urls
https://cors-anywhere.herokuapp.com/sapes5.sapdevcenter.com/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/
and
https://sapes5.sapdevcenter.com/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/
But was getting errors in connection process.
Below is a sample code for accessing Northwind DB, using script.
Is it possible to provide a sample code for accessing OData services of ES5.
<script>
var sURL1 = "http://services.odata.org/V4/Northwind/Northwind.svc/Customers";
var oModel = new sap.ui.model.json.JSONModel(sURL1, true);
sap.ui.getCore().setModel(oModel);
var oTable = new sap.m.Table("tableID", {
columns : [ new sap.m.Column ({
header:[ new sap.m.Label ({text: "Customer ID"})]}),
new sap.m.Column ({ header :[ new sap.m.Label ({text: "Company Name"})]})
]
});
oTable.bindItems("/value", new sap.m.ColumnListItem("listItem",{
cells:[ new sap.m.Text({text: "{CustomerID}"}),
new sap.m.Text ({text: "{CompanyName}"})
]}));
oTable.placeAt("content");
</script>
normally you will deploy the code to the server where the service is hosted to run the app
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.