on 07-20-2016 4:03 PM
Hi experts,
i want to pass to the getEntitySet method of my service 2 filter values
?$filter=PAR1 eq '01'&$filter=PAR2 eq '02'
But how can I access both filters in my service implementation. In the input filter string only the last value is inserted (PAR2 eq '02').
thanks for support.
br,
christoph
Hello Chris,
Please pass as below and check.
?$filter=PAR1 eq '01' and PAR2 eq '02'
Regards,
Ashwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Documentation
/IWBEP/IF_MGW_APPL_SRV_RUNTIME - SAP NetWeaver Gateway - SAP Library
To change to Internal table refer to
lt_filters = io_tech_request_context->get_filter( )->get_filter_select_options( ).
Refer to How to Develop Query Options for an OData Service Using Code-Based Implementation for sample.
Hello Chris,
1. For filter parameters documentation, you can refer to the one mentioned by Former Member
2. Inputs sent as $filters parameters are already available as part of select options which can be used directly in our select statements. Not necessary that always we need to convert and use as string in the select statements.
Use io_tech_request_context->get_filter( )->get_filter_select_options( ) to get the filter parameters in the format of select options. (data type /iwbep/t_mgw_select_option)
Regards,
Ashwin
You are using wrong URL
The correct URL should be ?$filter=PAR1 eq '01' and PAR2 eq '02'.
Refer to Section 4.5 of http://www.odata.org/documentation/odata-version-2-0/uri-conventions/
There are multiple ways to access the filter values, filter string being the most elementary.
A better option can be
lt_filters = io_tech_request_context->get_filter( )->get_filter_select_options( ).
Message was edited by: Atanu Mallik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
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.