cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Range in ABAP CDS with parameters?

Hello Abap developers,

I only managed to transfer "parameter" from the selection-screen(abap program) into the ABAP-CDS view and use it in "where" condition:

Is there a way to move a range(Selection-Option) and use it with "where" condition in the ABAP-CDS view with parameters?

Accepted Solutions (1)

Accepted Solutions (1)

horst_keller
Product and Topic Expert
Product and Topic Expert

Is such a way documented? No. So the answer is apparently no.

Answers (3)

Answers (3)

joachimrees1
Active Contributor

There recently was a blog on that topic, maybe it's helpful:

https://blogs.sap.com/2018/03/21/select-options-in-cds-using-table-function/

former_member284740
Participant

You don't need to 'transfer' your select-options or range into your CDS. You can still use them when you:

select from ..your_cds.. where ...

in your ABAP report.

And so you also don't need to use those parameters.

Former Member
0 Kudos

absolutely the part is abit trick u can have a minimised load with the parameters as much possible and then for the range part u treat it as a view and selec * from cds where x in range will do it.

prakashmani
Explorer
0 Kudos

Hi ,

Where condition with conditional operators less than or equal ( <= ) and greater than or equal ( >=) worked for range selection in CDS. But I think not possible for other options like include , exclude ranges that you get in abap range declarations.