on 02-15-2016 4:33 PM
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...
Hi
Check the code in the correct answer here
ODataModel.read: pass select and filters | SCN
Pass the filter as URL parameter in the read call.
Regards,
Sarbjeet Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sarbjeet,
thanks for the information. To understand the model concept, if I call e.g.:
var oModel = new sap.ui.model.odata.ODataModel("/sap/opu/odata/sap/ZMAIN_DBD_DASHBOARD_SRV/", true);
Does this already delivers the hole infomration like all the json data from the GetEntitySet method, or does this call only delivers the metadata of the service? If it only delivers the metadata of the service, I'm fine. If this call already delivers all the data, I will have a problem or does the read get the real data from the backend?
Thanks in advance...
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.