Skip to Content
Former Member
May 19, 2016 at 12:11 AM

Error when using sap.ui.model.odata.v2.ODataModel


I developed an App using SAPUI5 in HCP with persistence service. To connect to the databse, I'm using odata. If I use the object sap.ui.model.odata.ODataModel the connection works perfectly, but if I change it to recommende v2 version, I get a 501 error (Not Implemented), and no data is displayed at all. Has somebody encounter this issue when implementing the v2 odata object? See below the code I'm using to instantiate the odatamodel.

var OdataServiceUrl = "/route/service.svc";

var odataModel = new sap.ui.model.odata.ODataModel({

serviceUrl: OdataServiceUrl,

json: false