on 05-13-2013 2:34 PM
Hi!
Actually I started to develop some OData services and I am facing the following problem:
I want to filter s.th. with "SUBSTRINGOF" but I do not see this filter
IT_FILTER_SELECT_OPTIONS, IV_FILTER_STRING or IV_SEARCH_STRING
Any way to receive this information in SAP Netweaver Gateway?
Best regards
Torsten
Hi,
To be able to execute the substringof filter, the URI should be http://XXXXXXXXXXX/Z_DEMO_2_SRV/E1Set?$filter=substringof('Q',p1). You can check the information in parameter IV_FILTER_STRING and IT_FILTER_SELECT_OPTIONS in method GET_ENTITYSET of your Data Provider Class. For the given example the content of IT_FILTER_SELECT_OPTIONS and IV_FILETER_STRING would be
IV_FILTER_STRING :---> ( substringof ( 'Q' , p1 )
IT_FILTER_SELECT_OPTIONS
|_ _ _ _ _ _PROPERTY :--> p1
|_ _ _ _ _ _SELECT_OPTIONS :--->ICP*Q*
Hope this helps.
Atanu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
a late answer, so you might have found a solution.
You can use the io_tech_request_context.
There more filter information is stored.
You could use this for example:
DATA lv_select_string TYPE string.
lv_select_string = io_tech_request_context->get_osql_where_clause( ).
Example: $filter=substringof('Apel', Name2) eq true
It returns: NAME_ORG2 LIKE '%Apel%'
Which you can use in your select statement.
Regards, Toine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.