cancel
Showing results for 
Search instead for 
Did you mean: 

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

praveensap
Explorer
0 Kudos

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');

Accepted Solutions (1)

Accepted Solutions (1)

praveensap
Explorer
0 Kudos

Hi,

We have connected on-premise system with cloud platform.

Thanks & Regards,

Praveen

Answers (1)

Answers (1)

NickvanHeertum
Explorer
0 Kudos

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": "*"
});
praveensap
Explorer
0 Kudos

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

NickvanHeertum
Explorer
0 Kudos

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