Skip to Content

Username and Password are not working in ODATA Model

Hi all,

I've ran into a small issue with my SAPUI5 code. I've created a very simple SAP NetWeaver Gateway service and I am able to test this via restclient (in chrome or via the application).

Now when I do the following in my sapui5 controller

showSecondPage: function() {var oAppData = sap.ui.getCore().getModel("app").getData();var oModel = new sap.ui.model.odata.ODataModel(oAppData.BaseURL, false, "user", "password");sap.ui.getCore().setModel(oModel);

In the developers tool (Network section) i see that the $metadata call is formatted this way:


And the response for this call is the login-form from SAP. It should not ask Credentials again,

The thing is when i open another tab in chrome and go manually to the metadata url and log in there it just works.


I have seen your post

Can you provide solution.


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 26, 2017 at 03:27 PM
    Add comment
    10|10000 characters needed characters exceeded