Skip to Content
Former Member
May 19, 2016 at 06:42 AM

skip user id and password while running app for getting data from Odata into JSON model


Hi All,

By one of the tutorial, I could able to get Products data by using the url :

var sUrl = ""; Here, userid and password are not given and able to get data.

In the same way, I want to get data from a custom table using the following register service.

var sUrl = "";

In this case, when I am trying to access data from my system, I thing we should give user id and password. So what code should be added to the follwoing or can we skip the authentication and get data as public access.

1. var sUrl = "";

2. var oModel = sap.ui.model.json.JSONModel(sUrl);

3. sap.ui.getCore().setModel(oModel);

4. this.getView().setModel(oModel);

How should I replace line 1, with my registered service url ( )

* either i want skip authentication or which code should be written to give user id and password so as to get data