Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

Request help on new sap.ui.model.odata.ODataModel (sServiceUrl, bJSON?, sUser?, sPassword?, mHeaders?)

$
0
0

Hi Experts

 

When I use the following in my code:

 

oModelLocationsBE = new sap.ui.model.odata.ODataModel(gServiceURL, true, gServiceUser, gServicePassword, null);

 

What is returned to my variable oModelLocationsBE?

 

How do I access the JSON data?

 

I have tried to use:

 

try {

  oAbort = oModelLocationsBE.read("/Locations", undefined, undefined, true, beGetLocationData_OnSuccess, beGetLocationData_OnError);

}

catch(ex) {

  alert(ex);

}

 

But it keeps returning the error "InvalidAccessError"!

 

Any idea what is wrong?

 

Tested the service with the Netweaver Gateway Client and all works fine from there.


Viewing all articles
Browse latest Browse all 6178

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>