Advertisement
ignatov

Untitled

Aug 7th, 2020
984
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     onInit: function() {
  2.  
  3.             var sUrl = "/sap/opu/odata/SAP/ZAPP14_SRV_01/";
  4.             var oDataModel = new sap.ui.model.odata.v2.ODataModel(sUrl, {
  5.                 json: true,
  6.                 loadMetadataAsync: true
  7.             });
  8.  
  9.             var oModel = new sap.ui.model.json.JSONModel();
  10.             oDataModel.read("/countSet", {
  11.                 success: function(oData, response) {
  12.                     oModel.setData(oData);
  13.                 }
  14.             });
  15.             oModel.setSizeLimit(300);
  16.             this.getView().setModel(oModel, "count");
  17.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement