Skip to Content
0
Former Member
Aug 06, 2016 at 02:40 PM

An error in getEntitySet request

54 Views

Hello!

Help me please. I need to send a getEntitySet request to get a response. I write following:

var aFilters = [];
aFilters.push(new Filter("Bukrs", sap.ui.model.FilterOperator.EQ, '1010'));
aFilters.push(new Filter("SpdDate", sap.ui.model.FilterOperator.EQ, '20161015'));
var allFilter = new sap.ui.model.Filter(aFilters);

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

oModel.read('/SPD_CreateSet', { 'filters': allFilter, 'success': function(data){
    console.log(data);
} } );

...And I see an error in console:
ODataUtils.js:6 Uncaught TypeError: Cannot read property 'sPath' of undefined

on line 8 (the code in this example).

But when I remove the filters.. There is no error.
But I need to send a request with filters. Now I can do this?

Thank you!