Skip to Content
Former Member
Feb 15, 2016 at 04:33 PM

oData $filter in URL


Hi all,

when trying to call method GetEntitySet with $filter extension, I'm getting the following error:

failed400,Bad Request,{"error":{"code":"005056A509B11ED1BDD3D7B1A3B4C509","message":{"lang":"de","value":"Die Anforderungs-URI ist ungültig. Das Segment 'EtDbDatenQ1AnzSet' verweist auf eine Entitätsmenge und nicht auf eine einzelne Entität"},

It says: Segment EtDbDatenQ1AnzSet is an entityset and not an single entity...

If I call the service via browser or Gateway Client, everthing works fine:

But how do I call it via UI5. The normal call for the hole model would be:

var oModel = new sap.ui.model.odata.ODataModel("/sap/opu/odata/sap/Z_ZMAIN_DBD_DASHBOARD_TEST_SRV/", true);

If I don't want to get the hole model at once (because it's a lot of data), how do I call it then:

var oModel2 = new sap.ui.model.odata.ODataModel("/sap/opu/odata/sap/Z_ZMAIN_DBD_DASHBOARD_TEST_SRV/EtDbDatenQ1AnzSet?$filter=Datum eq '20160212'", true);

I'm getting an error calling the Model this way...

Thanks in advance...


gateway.PNG (87.9 kB)