Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple parameter values in CDS view

kalpesh_pandey
Contributor
0 Kudos

Hi, We are working on ABAP CDS views on S4HANA 1610. We have a requirement to pass multiple values to a parameter and then filter data on it. Basically I am using this parameter in WHERE statement. I don't see IN clause is supported in ABAP CDS views. So what is the best way to achieve this.

I cannot use RANGE Means between to restrict data. My parameter values are individual text i.e. 'XXXX','YYYY' etc

We can use filter with OR in OData to achieve this at OData layer but I think its best if I can filter data at DB level.

Thanks,

Kalpesh

4 REPLIES 4

former_member564522
Active Participant
0 Kudos

Hi Kalpesh,

You may use Table function along with AMDP. check below blow for more informatin.

https://blogs.sap.com/2015/10/21/abap-news-for-release-750-cds-table-functions-implemented-by-amdp/

Regards

Himanshu

kalpesh_pandey
Contributor
0 Kudos

Thanks. I guess I should have mentioned that once we expose CDS views as OData they are provisioned in Dell Boomi and then consumsed by Tableau. We don't have option as AMDP. As it cannot be exposed as OData easily. Users are outside of SAP system.

Thx

DoanManhQuynh
Active Contributor
0 Kudos

Can you use BETWEEN instead?

I'm thinking of using @Consumption.derivation along with @Consumption.filter for elements but i dont know is it accept multiple value or not, you could give it a try

kalpesh_pandey
Contributor
0 Kudos

Thanks, I cannot use RANGE Means between to restrict data. My parameter values are individual text i.e. 'XXXX','YYYY' etc.

I provided one filter to pass. If business needs data for multiple then they have to call those many times. Each time with single filter.

Thx