cancel
Showing results for 
Search instead for 
Did you mean: 

Contains Operator is not working with OR condition while doing search on two columns in smart table

Former Member
0 Kudos

Hi All,

I have created search bar in smart table tool bar, i want to perform the search with entered value on two columns (QuotID and SalesOrg) in smart table using 'Contains' operator with 'OR' condition, but while doing search all records are coming from the back end. Below is the network tab url.

url : QuoteSet/?$filter=(substringof('8',QuotID) or substringof('8',SalesOrg)) and QuotStat eq '1' and (Assign eq 'X' or Assign eq '') and (QuoteFlag eq true or QuoteFlag eq false).

but if i do search on single column of table using 'Contains' operator it is working fine.

Filters are implemented for all columns at odata level.

Please guide me on this.

Thanks in advance,

Regards,

Purushotham.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member185414
Active Contributor
0 Kudos

With this URL, you should get below entries in it_filter_select_options or io_tech_request_context->mt_filters

I EQ *8* QuotID

I EQ *8* SalesOrg.

Based on above you can use the CP operator on internal table and filter the data.

The answers seems straighforward but is this what you are looking for or not ?

former_member185414
Active Contributor
0 Kudos

With this URL you should be getting below filter in it_filter_select_options internal table ( now advised way is to fetch the same from io_tech_request_context) .

I EQ *8* for QuotID

I EQ *8* for SalesOrg.

Based on above you can use a CP keyword on internal table and mode. I think the answer is straighforward here but am I missing something which you have asked ?