Skip to Content
0

Unable to get data from odata service in sap ui5 in Orion Personal webide

Nov 16, 2017 at 01:29 PM

84

avatar image
Former Member

Dear All,

I am working on Orion Personal webide and connected onPremise system by saving credentials in file at C:\SAPWebIDE\eclipse\config_master\service.destinations\destinations

I am getting this error when sap ui5 application is calling gateway URL to access the data.

Please let me know with suggestion.

Thanks & Regards,

Praveen

My issue is very much similar to this issue.

I am using below code -

var sURI = "https://GWName.com/sap/opu/odata/sap/Y_SRV";
var oDataModel = new sap.ui.model.odata.ODataModel(sURI);
sap.ui.getCore().setModel(oDataModel);
//"https://GWName.com/sap/opu/odata/sap/Y_SRV/YResults/";
//var oDataModel = new sap.ui.model.odata.ODataModel(sURI,true,'username','password');
capture.jpg (19.7 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
avatar image
Former Member Apr 07 at 04:07 PM
0

Hi,

We have connected on-premise system with cloud platform.

Thanks & Regards,

Praveen

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Nov 24, 2017 at 01:21 PM
0

What i did to solve a similar issue is adding this to the code, its not with gateway but with HANA XS.

_oModel.setHeaders({
"Access-Control-Allow-Origin": "*"
});
Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Nick,

I have tried this option but it didn't worked.

Ideally when we are calling oData URL then application should ask for username and password but it is neither asking for it nor it is going through when I am passing credential in oData model.

Please suggest.

Thanks,

Praveen

0
Former Member

Have you tried doing it by creating a cloud connector to your ECC and then adding a destionation in the CP?

This is how we do it (best practice) and don't have this issue

Edit: you're using personal webide so this should be followed, https://help.hana.ondemand.com/webide/frameset.htm?2cf47f37e34c428c97a51057733c0394.html

0