on 02-08-2017 5:23 PM
Dear all,
I currently have a problem regarding filtering oData model in a search help( Search Event).
I created the search help using the import search help tool in SEGW.
I want the input to filter the search help list on title or description.
My point is nothing is retrieved when I am sending the following url tag:
$filter=(substringof('00',Bukrs)'or'substringof('00',Butxt))
I do have data corresponding to this query in my model. Moreover, I am getting data when sending the following:
$filter=(substringof('00',Bukrs)'and'substringof('00',Butxt))
I could reach debug in my service get_entityset method.
I saw that the intput parameters:
* IT_FILTER_SELECT_OPTIONS was empty
* IV_FILTER_STRING = ( ( substringof ( '00' , Bukrs ) or ( substringof ( '00' , Butxt ) )
=> This causes a tech error making my filtering fail.
I can't understand why the and is working when the or is wrong
Hi Pierre,
Thanks for your answer. I can indeed do that but I won't be able to use the "standard" auto-generated code for search help contained in my class Z*_DPC.
I can do this in the Z*DPC_EXT without problem by coding and interpreting the value as I want but I would like to use the standard code for a better evolution potential.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You have to use IV_FILTER_STRING to filter when using an OR condition. Example:
SELECT * FROM MYTABLE INTO CORRESPONDING FIELDS OF TABLE ET_ENTITYSET
WHERE (IV_FILTER_STRING).
Cheers,
Pierre
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.