Skip to Content

auto refresh of viz chart data using odata model not working

Aug 24, 2017 at 10:31 AM


avatar image
Former Member

Hi All,

I have created a line graph with sapui5 by fetching data from a table “T_IOT_71BF4C35C86ACDB8FC33” in sap hana trail instance .

I used odata model for bindings ,but when ever i am inserting a new row in a table manually then bindings are not refreshing automatically.But if i refresh them manually using “refresh” method of odata model newly created row is reflecting in graph.

Please find code below

var url = “/destinations/tools/”;

var oModel = new sap.ui.model.odata.ODataModel(url);

oModel.setDefaultBindingMode(“TwoWay”); oModel.setRefreshAfterChange(true);


var oVizFrame = this.getView().byId(‘idVizFrame’);

var oDataset = new{ dimensions: [{ name: ‘G_CREATED’, value: { path: ‘G_CREATED’, formatter: this.formatDate }
measures: [{ name: ‘C_VALUE’, value: ‘{C_VALUE}’ }],
data: { path: “/T_IOT_71BF4C35C86ACDB8FC33” } });



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers