Skip to Content
0
Aug 29, 2017 at 10:32 AM

GW ODATA on SAP HANA XS in SAPUI5

104 Views

Hello,

I am designing a SAPUI5 Application on SAP HANA XS in which I want to use a ODATA service from separate Gateway Server (using http). I tried by passing credentials also in OData Model but still call is unsuccessful.

I am testing this in Google Chrome and no pop-up comes to enter Credentials.

var url ="http://hostname:50000/sap/opu/odata/sap/ZDEMO_ODATA_SRV/";

var oModel = new sap.ui.model.odata.ODataModel(url,false,"Username" ,"Passsowrd");

//Also tried :
//var oModel = new sap.ui.model.odata.ODataModel(url,false,{user:"Username"
// ,password:"Passsowrd"});

		    var	path = "/REG_SalesSet";
			var that = this;
			
oModel.read(path, null, function(oData, oResponse){
	var model = new sap.ui.model.json.JSONModel(oData.results);
		this.setModel(model);
			});

Attachments

capture.png (21.2 kB)