cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

  });

junwu
Active Contributor
0 Kudos

where is the code for v2?

Accepted Solutions (0)

Answers (2)

Answers (2)

boghyon
Product and Topic Expert
Product and Topic Expert
0 Kudos

The V2 of ODataModel comes with pre-enabled features that the previous ODataModel didn't have or had them disabled by default (such as batch requests). If it's not possible to implement them on your server-side, try to disable them when instantiating the V2 model.

former_member185414
Active Contributor
0 Kudos

Any error in gateway error log - /n/IWFND/ERROR_LOG

BR.