CDS View with Multiple Parameters referring to the data element or abap data types
The below post created a CDS view with input parameters and input parameters refer to the ABAP DDIC data elements.
Define two input parameters and specify their data element to define their data type and length details.
Save and Activate the CDS view. Now in SE11 , the SQL view has selection condition.
Make data preview and it asks for the input parameters.
Provide input parameters.
Go to the SQL Console.
This is how the SQL query is made and later will see how from ABAP report/class to make SQL statement.
Also once you select Parameters it allows to change the input parameters.
This is how we can make SQL query on CDS view with parameters.
In above CDS the input parameters refer to the ABAP data elements but it is also possible to declare input parameters where it can be represented by the ABAP data types and specifying the length as made for the input parameter : p_connid .
Save and activate CDS view.
Data preview the CDS view.