Advertisement
ignatov

Untitled

Jan 6th, 2022
1,834
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         onInit: function() {
  2.  
  3.             var sServiceUrl_v1 = '/sap/opu/odata/SAP/ZDEMO_VERS_SRV;v=1';
  4.             var OdataModel_v1 = new sap.ui.model.odata.v2.ODataModel(sServiceUrl_v1);
  5.             var sPath1 = "/outTextSet";
  6.             OdataModel_v1.read(sPath1, {
  7.                 success: function(oData, response) {
  8.                     console.log(oData.results);
  9.                 }
  10.             });
  11.  
  12.             var sServiceUrl_v2 = '/sap/opu/odata/SAP/ZDEMO_VERS_SRV;v=2';
  13.             var OdataModel_v2 = new sap.ui.model.odata.v2.ODataModel(sServiceUrl_v2);
  14.             var sPath2 = "/outTextSet";
  15.             OdataModel_v2.read(sPath2, {
  16.                 success: function(oData, response) {
  17.                     console.log(oData.results);
  18.                 }
  19.             });
  20.  
  21.         }
  22.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement