cancel
Showing results for 
Search instead for 
Did you mean: 

How to solve this bug HTTP request failed404,Not Found

Former Member
0 Kudos

Hi experts

I've problem in binding the back-end data with sapui5 element.

For that i'm using OData service call ( url :' /sap/opu/odata/sap/Z_DEMO2_SRV/')

onInit: function() {

  var oModel = new sap.ui.model.odata.ODataModel( "/sap/opu/odata/sap/Z_DEMO2_SRV",false, "username", "password");

  //Set the Model to the Table

  var oTable = sap.ui.getCore().byId("bankTableID");

  oTable.setModel(oModel);

  alert(oModel);

  // Filter the DATA

  var FilterOperator = sap.ui.model.FilterOperator;

  var filter = new sap.ui.model.Filter("MANDT",FilterOperator.EQ, "AR");

  //Bind the Data to the Table

  oTable.bindRows("/rajesh");

  },

i've included the error screen shot in attachment.

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hi Rajesh,

Is your issue resolved? I am facing the same issue, so could you please give me some pointers?

As shown in the pic, localhost is already in the list to bypass the proxy settings. TIA.

Regards,

Sumit Jindal

joao_sousa2
Active Contributor
0 Kudos

In his case, the URL had "localhost" in it, which was probably not the backend. Are you sure the HTTP request has the correct hostname in it?

When you using the Netweaver as web server you can skip the complete URL, not when you are testing it in the local server, in the local server your URL of the model should include the hostname.

This:

var oModel = new sap.ui.model.odata.ODataModel( "/sap/opu/odata/sap/Z_DEMO2_SRV",false, "username", "password");


Is wrong, unless you are running the app from SAP Netweaver Gateway server.

Former Member
0 Kudos

Hi Rajesh,

I guess you have issue with proxy server in your eclipse.

As you can see from your log, you tomcat server cannot find site where oData service should be.

I hope this helps you,

Peter

Former Member
0 Kudos

Hi Peter,

Thanks for your valuable suggestion.

i got the point.

Rajesh Roy