Skip to Content
avatar image
Former Member

oData filtering with 'OR' when using server mode is not working


this is my code to search a string in several columns of a table.

the table is using an oData model with default operation mode = server mode.

when i try to user filter with 'or' ( and : false ) the query fails.

if i change operation mode to client mode or and : true it works but i don't want it.

what can i do??

the filter strings that is sent to gateways is a follows :

( ( startswith ( Kunnr , 'xxx' ) or ( startswith ( Mcod1 , 'xxx' ) )

			handleTableDialogSearch: function(oEvent) {
				var sValue   = oEvent.getParameter("value");
				var oBinding = oEvent.getSource().getBinding("items");
				var filters  = [];

				for(var i=0;i<oItems.length;i++){
					filters.push(new Filter(oItems[i].template, sap.ui.model.FilterOperator.StartsWith, sValue));

				var oFilter = new Filter({
					filters : filters , 
					and	 : false,



error from GW:

2017-12-19 18:18:15.141270 The following problem occurred: HTTP request failed500,Internal Server Error,{"error":{"code":"/IWBEP/CM_MGW_RT/032","message":{"lang":"en","value":"Internal error occurred, contact your system administrator."},"innererror":{"application":{"component_id":"","service_namespace":"/SAP/","service_id":"ZSD_CRD_APP_SRV","service_version":"0001"},"transactionid":"318B3E7F9D9D0080E005A2500D490E51","timestamp":"20171219161815.0270790","Error_Resolution":{"SAP_Transaction":"Run transaction /IWFND/ERROR_LOG on SAP Gateway hub system (System Alias ) and search for entries with the timestamp above for more details","SAP_Note":"See SAP Note 1797736 for error analysis (","Batch_SAP_Note":"See SAP Note 1869434 for details about working with $batch ("},"errordetails":[{"code":"/IWBEP/CX_MGW_TECH_EXCEPTION","message":"Internal error occurred, contact your system administrator","propertyref":"","severity":"error","target":""}]}}} -

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Dec 19, 2017 at 06:07 PM

    Server mode means data filtering will happen on server via odata call.

    Client mode means all processing will be local on the json model.

    Regarding filter not working with 'or' & workign with 'and' , please post the exact filter clause so that we can advise.

    Add comment
    10|10000 characters needed characters exceeded