Application Development and Automation 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: 
Read only

CDS View Extractor - Paramter with multiple values

0 Likes
985
  • SAP Managed Tags

Hi there!

I'm just migrating some old ABAP extractors to CDS extractors and got the following issue:

The old extractor has some parameters, for example the parameter "class". It was possible to fill this paramter with no value, one value or multiple values. In the implementation it could be used in conjunction with the IN-operator:

SELECT * FROM table WHERE class IN lr_class.

In the CDS view, I can also define parameters. But I don't know how I could pass multiple values to the parameter, because the CDS syntax is lacking the IN-operator.

So, this is syntactically not working:

@AbapCatalog.sqlViewName: 'ZTEST_EX'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Sub-view for ZTEST_EXTRACTOR'
define view ZTEST_EXTRACTGOR with parameters p_class : KLASSE_D as select from klah {
    atnam,
    class
}
where class in (:p_class);

so, the question is how can I handle multiple parameter values a CDS view?

Many thanks!

0 REPLIES 0