SAP CDS F1 PARAM



Get Example source ABAP code based on a different SAP table
  


• : ABAP_CDS_DEFINE_ABSENT
• : ABAP_CDS_DEFINE_TABFNC
• : ABAP_CDS_DEFINE_VIEW
• : ABAP_CDS_DEFINE_HIERA
• : ABAP_CDS_DEFINE_CUSTOM
• : ABAP_CDS_DEF_VIEW_ENT

ABAP_CDS_DDL - parameter

ABAP_SYNTAX
... $[@parameter_annot1$]
$[@parameter_annot2$]
...
pname : typing
$[@ < parameter_annot1 $]
$[@ < parameter_annot2 $]
...

ABAP Addition
... @parameter_annot $| ... @ < parameter_annot

What does it do?
Defines a CDS parameter called pname in one of the following:
Parameter list of a CDS view entity
Parameter list of a CDS analytical projection view
Parameter list of a CDS table function
Parameter list of a CDS hierarchy
Parameter list of a CDS custom entity
Parameter list of an CDS abstract entity
Parameter list of a ABAP_CDS_V1_VIEW
The name pname must comply with the naming rules for names. Furthermore, pname cannot contain any slash (/) characters and cannot be a reserved name in ABAP Dictionary. The name pname must be unique and be located in the namespace of the elements and exposed CDS associations of the current CDS entity. In table functions, the reserved name connection cannot be used. All reserved names that cannot be used are specified in the DDIC database table TRESE . The evaluation of names is not case-sensitive. Blanks in the comma-separated parameter list are ignored and can be omitted.
Each 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, abap.rawstring , and abap.string. In CDS view entities and CDS table functions, parameters can also have data type abap.string.
A CDS SQL entity for which CDS parameters are defined as input parameters can be used as
data source or in a path expression of a different CDS view entity or ABAP_CDS_V1_VIEW
A data source of a SELECT statement from AB_SQL in ABAP
In these cases, each input parameter must be assigned a suitable actual parameter whose value is then used in the operand positions in which the parameter is specified. The actual parameters are assigned using a parenthesized comma-separated list as follows:
... cds_entity( pname1 : act1, pname2 : act2, ...) ...,
This list must be specified directly after the name of the view when using an entity with parameters (both within the CDS DDL in ABAP CDS and in AB_SQL ). In AB_SQL , an equal sign (=) is used instead of a colon (:).



Latest notes:

It is not currently possible to define optional input parameters or replacement parameters for input parameters. The annotation @Environment.systemField can be used, however, to make AB_SQL pass ABAP system fields to an input parameter implicitly.
NON_V5_HINTS
ABAP_HINT_END

ABAP Addition

What does it do?
Specifies annotations for the parameter. The annotations can be specified before the parameter using @parameter_annot or after the parameter using < @parameter_annot. The latter is possible only for ABAP_CDS_V1_VIEWS , CDS table functions, and CDS hierarchies but not for CDS view entities, CDS custom entities, and CDS abstract entities.

ABAP_EXAMPLE_VX5
The example shows a CDS view entity with one CDS parameter called P_MyParameter.
DDLS DEMO_SALES_CDS_SO_PARAM_VE
ABAP_EXAMPLE_END