CDS View with Parameters


CDS views now come with the request Parameterization where scalar parameters can be passed to a CDS view.

CDS with Parameter is very similar to normal CDS with the addition of keyword WITH PARAMETERS followed by the parameter name and its type.

Till ABAP version 7.51, structured or tabular parameters are not allowed.

Let’s take a simple example to understand this:


Here, CDS view ZCDS_PARAM has single parameter PART_NUMBER with type MATNR. This input parameter is used in WHERE condition with “:” operator. Instead of “:” operator, “$PARAMETERS” can also be used (line 16).

Consuming CDS view is very easy and it can be achieved by passing parameters with SELECT. A CDS can be consumed by e.g. other CDS or an ABAP program.


Above, a simple ABAP SELECT is consuming CDS – ZCDS_PARAM by passing parameter PART_NUMBER!


Feel free to Clone the Code from GitHub and test by yourself!



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s