cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 Table binding with ODATA model.

ranjit_rao
Participant
0 Kudos

Hello,

I have been trying to bind my SAPUI5 table using ODATA model. The ODATA Service I used is as follows:

var oModel = new sap.ui.model.odata.ODataModel("proxy/http/services.odata.org/OData/OData.svc", false);

I have tried everything only to find my table to be populated with "no data"

I have tested using Chrome, but there in the console log I found the following error.:

"The following problem occurred: HTTP request failed400,Bad Request,<?xml version="1.0" encoding="utf-8"?><m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><m:code /><m:message xml:lang="en-US">The MaxDataServiceVersion '2.0' is too low for the response. The lowest supported version is '3.0'."

Please help................

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor
0 Kudos

Hi Ranjit,

the OData Model in UI5 supports only OData 2.0 specification at the moment (see https://sapui5.netweaver.ondemand.com/sdk/#docs/guide/91f11c116f4d1014b6dd926db0e91070.html).

You can access the OData 2.0 version of your service with following path information when you create your ODataModel instance: "proxy/http/services.odata.org/V2/OData/OData.svc/"

Best regards,

Florian

ranjit_rao
Participant
0 Kudos

Hi Florian,

Thanks a lot. It worked like magic.

Answers (0)