// create a new oData model with your connector and simplifier token
var oModel = new sap.ui.model.odata.ODataModel("/client/1.0/odata/<your-connector>/?SimplifierToken=<your-token>");
// read the service endpoint
oModel.read("<your-endpoint>", null, null, true, function(oData, response) {
// do your work here
}.bind(this));
Since you can access the simplifier global variables simply by
this.getGlobals().getVar("<your-variable>")
you could do something like
var oModel = new sap.ui.model.odata.ODataModel("/client/1.0/odata/" + this.getGlobals().getVar("odataCon") + /?SimplifierToken=" + this.getGlobals().getVar("token"));
oModel.read(this.getGlobals().getVar("odataEndpoint"), null, null, true, function(oData, response) {
// set result as items of your table
this.setItemModel("Test", "Test_Table1", "items", oData.results);
}.bind(this));
Ansicht von 2 Beiträgen – 1 bis 2 (von insgesamt 2)