cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple single values to a parameter in ODATA bex query

samyukthakota
Explorer
0 Kudos

Hi All,

we have a requirement to a bex variable with several single values.

once meta data is generated,how to pass multiple single values in URI.

please provide syntax.

Your help is much appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

samyukthakota
Explorer
0 Kudos

Hi All,

Thanks for all replies.

we figured out a solution by passing the value of filters to the variables of Bex query in the classes generated by ODATA query.

Filters works once the result set is generated(millions of records).but we need the result set (hundreds of records)to be generated based on the values given.

priyanka_kumari23
Active Participant
0 Kudos

Hi Samyuktha,

Can you please guide how to pass Input parameter for ODATA created on Bex Query?

0 Kudos

Hi Samyuktha,

We have a similar urgent requirement. Could you please share any document or steps on how to pass the filter values in Odata generated classes.

Thank you,

Sammy

former_member34
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi there,

You have a question and need help by the community? Instead of posting into an old question thread, it is more helpful for you, if you create your own question. Here is how to get started:

  1. Learn about asking and answering questions in SAP Community with this tutorial: https://developers.sap.com/tutorials/community-qa.html
  2. Ask your detailed question here: https://answers.sap.com/questions/ask.html
  3. Wait for a response.

That's it. Thank you!

Best regards

Jennifer

Your SAP Community moderator

Answers (1)

Answers (1)

former_member190010
Contributor
0 Kudos

Hi Samy,

You can filter by several values using the following url:

Collection?$filter=Field1 eq 'value1' and Filed2 eq 'value2' ...

If you want a real example, see the following post:

OData QueryMethod ParameterAlternative way to get the valueCoding required to implement Query Operation
UserCollection?$filter=UserID eq '123' and LastName eq 'Mahajan'IT_FILTER_SELECT_OPTIONS and IV_FILTER_STRINGDATA: my_filter_options TYPE/iwbep/t_mgw_select_option,
my_filter_string
TYPE string.
my_filter_options
=io_tech_request_context->get_filter( )->get_filter_select_options( ).
my_filter_string 
= io_tech_request_context->get_filter( )->get_filter_string( ).
Yes

Regards,

Emanuel

samyukthakota
Explorer
0 Kudos

Hi Emanuel,

thanks for the quick response,

we are trying to pass the values to variables before we get usercollection.

filter option works once usercollection is filled with data.

any way can we pass multiple values to a parameter entity.(we are looking for several single values for a variable as input for query to execute)

please correct me if am wrong.

EkanshCapgemini
Active Contributor
0 Kudos

Hi Samyuktha,

Not sure about what needs to be done from the BEX query end but this is how you pass multiple values to single parameter in OData URI conventions:

EntitySet?$filter=Parameter1 eq 'Value1' or Parameter1 eq 'Value2' or Parameter1 eq 'Value3'

Regards,

Ekansh

former_member190010
Contributor
0 Kudos

Samy,

You can pass multiple values to the same variable.

See this url example:

Products?$filter=ProductID ge 'A' and ProductID le 'C'



Regards,

Emanuel