SAP CDS PARAMETER LIST APV



Get Example source ABAP code based on a different SAP table
  


• WITH PARAMETERS ABAP_CDS_ANALYTICAL

ABAP_CDS_DDL - parameter_list, Analytical Query

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

What does it do?
Defines CDS parameters parameter1, parameter2, ... as input parameters of a CDS analytical projection view in a comma-separated list.
An input parameter called pname can be accessed using the syntax $parameters.pname.
It can be used as an operand in the following places in the element_list of the projection view:
Element in the element 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 (see here).
Operand of a cast expression.
Operand of a case expression.
Operand of a built-in function, as long as it has a suitable data type.
Operand of an expression cds_cond in a WHERE clause.
ABAP_CAUTION Not more than one parameter can be annotated with @Semantics.businessDate.At, because the ABAP Analytical Engine currently supports only one temporal dependency.

Parameter Passing
How to pass values to input parameter is described in topic CDS parameter passing.



Latest notes:

If the underlying projected entity requires parameters, you can pass them on using the following syntax:
DEFINE TRANSIENT VIEW ENTITY analytical_query
AS PROJECTION ON cds_entity ( parameter : $parameter.param )
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
The following CDS analytical projection view DEMO_CDS_ANALYTIC_PARAMETER defines an analytical query with an input parameter. The input parameter is used for a currency conversion. The projection view is based on the cube view DEMO_CDS_CUBE_VIEW.
DDLS DEMO_CDS_ANALYTIC_PARAMETER
ABAP_EXAMPLE_END