on 07-02-2013 10:36 AM
Hi
Does OData accept an array as a query input? I have only seen single fields as filter options and vaguely remember reading that table inputs are not suported.
In a lot of our BAPIs, we have range tables for input/table parameters.How do we handle them?
- How do we pass them when calling OData services, using OR?
- How should we build the gateway service( data mapping/ method ) to handle these range tables as inputs.
If I select the table type in the service builder data model creation step, it creates a new entity type for the table parameter.
For example, the service needs to return the Store details for a list of stores, instead of calling the service per store, I should be able to pass the stores all in one go.
My RFC has a range of type WERKS_T_RANGE, the service data model needs to have StoreNo as the parameter. How should multiple store no.s be passed in the service?
Thanks
Arthi
Hi Arthi,
You can use the following URL pattern to pass multiple values for the same field using OR .
http://<HOST>:<PORT>/MYSERVICE/MyCollection?$filter=FIELD1 eq 'AAAAA' or FIELD1 eq 'BBBB'
You will get the values in form of select option in parameter it_filter_select_options in the Data Provider (or Data Provider Ext) class.
Regards,
Atanu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.