SAP CDS PARAMETER LIST V2



Get Example source ABAP code based on a different SAP table
  


• WITH PARAMETERS ABAP_CDS_DEF_VIEW_ENT

ABAP_CDS_DDL - CDS View Entity, parameter_list

ABAP_SYNTAX
... WITH PARAMETERS parameter1, parameter2, ...

What does it do?
Defines CDS parameters parameter1, parameter2, ... as input parameters of a CDS view entity in a comma-separated list.
An input parameter called pname can be accessed using the syntax $parameters.pname.
A parameter must be typed with an elementary data type. All data types listed in topic Typing are allowed, except for abap.accp, abap.geom_ewkb, and abap.rawstring .
It can be used as an operand in the following places in the SELECT statement of the view entity:
Element in the SELECT list. An alias name is mandatory.
Operand of an arithmetic expression. The parameter can have any of the numeric data types that are supported in arithmetic expressions in SELECT statements (see here).
Operand of an aggregate expression . The parameter can have any of the data types that are supported in aggregate expressions in SELECT statements.
Operand of a case distinction.
Operand of a cast expression.
Operand of a built-in function, as long as it has a suitable data type.
Right side of an expression cds_cond in a WHERE clause or HAVING clause
Right side of an expression cds_cond in an ON condition in an ABAP join or a CDS association
Right side of an expression cds_cond in a filter condition of a path expression
Right side of an expression cds_cond in the default filter condition of a CDS association

ABAP_EXAMPLE_VX5
The following CDS view entity has a list of three input parameters used in the WHERE clause of the SELECT statement. For information about passing actual parameters in a SELECT statement in ABAP, see the executable example SELECT, CDS View Entity with Input Parameters.
DDLS DEMO_CDS_PARAM_VIEW_ENTITY
ABAP_EXAMPLE_END