Skip to Content
0
Former Member
Nov 10, 2015 at 10:42 AM

Asterix in SAPUI5 with filter does OR, not AND

202 Views

Hi all,


I want to implement a search in SAPUI5. There you can use the asterix () like in SAP.</p><p>So for example, if you want don't know the exact string you could write "HansHuber". So everything which starts with "Hans" and ends with "Huber" should be found.

With the filters in SAPUI5 there is the open with startsWith, endsWith - so this is no problem. But the problem is, that it does a OR relation and not a AND relation.

Here is the parameter string I get for the above example:

((startswith(BeCode,'HANS') or endswith(BeCode,'HUBER')))


As you can see, there is an OR but I need an AND. Could it be, that is automatically an OR because I want to filter two times on the same attribute (BeCode)? By default, SAPUI5 does the filter relation with AND - if you want to OR you have explicit set a flag.


Somebody any idea?


Thank you in advance,

Bastian