Ansicht
Dokumentation

ABENCDS_F1_PARAMETER_ANNOTATIONS - CDS F1 PARAMETER ANNOTATIONS

ABENCDS_F1_PARAMETER_ANNOTATIONS - CDS F1 PARAMETER ANNOTATIONS

TXBHW - Original Tax Base Amount in Local Currency   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

- parameter_annot

... @annotation ...
... @annotation ...

Effect

Specifies an annotation annotation as a parameter annotation in the definition of an CDS parameter parameter in one of the following:

Parameter annotations can be specified before and after the parameter:

  • In front of the parameter, the character @ must be placed before the name annotation of the annotation.
  • After the parameter, the characters @ must be placed before the name annotation of the annotation.
This notation is possible for all CDS entities listed above, except for CDS view entities. For CDS view entities, all annotations, including parameter annotations, are possible only in front of the element they refer to.

The annotation should be defined as a CDS object in a CDS annotation definition and the annotation definition annotation @Scope should be specified here using the value #PARAMETER.

EndUserText Annotations

Translatable texts of the parameter.
EndUserText.label,,Translatable short text of the parameter,,Character string with maximum 60 characters,,-,,-
EndUserText.quickInfo,,Translatable tooltip of the parameter,,String,,-,,-

Note

Environment Annotations

Defines parameter passing from to a CDS view.
Environment.systemField,,Assigns an ABAP system field to the input parameter for implicit parameter passing in .,, #CLIENT:\lbr sy-mandt \lbr\lbr #SYSTEM_DATE:\lbr sy-datum \lbr\lbr#SYSTEM_TIME:\lbr sy-uzeit \lbr\lbr#SYSTEM_LANGUAGE:\lbr sy-langu \lbr\lbr#USER:\lbr sy-uname,,-,,not possible; \lbr syntax error (CDS view entity) or exception (all other CDS entities)

An input parameter can be annotated strictly once with the annotation Environment.systemField. If the CDS entity is used as a data source of a SELECT statement in , this assignment has the following consequences:

  • No explicit actual parameter can be assigned in to an input parameter to which the system field sy-mandt was assigned using #CLIENT. always implicitly passes the ID of the current client in accordance with the nominal value of sy-mandt or from the clients specified using USING CLIENT. The obsolete addition CLIENT SPECIFIED cannot be specified when a CDS entity of this type is accessed.
  • No explicit actual parameter needs to be assigned in to an input parameter to which a system field other than sy-mandt is assigned using #SYSTEM_.... If no explicit actual parameter is specified, passes the nominal value of the assigned system field implicitly.
  • For ABAP CDS, this annotation has no effect. Each formal parameter requires an actual parameter and also session variables must be specified explicitly.

Any other values for value are ignored and raise an exception. For CDS view entities, no value or a wrong value lead to a syntax error.

Notes

  • The annotation @Environment.systemField is ignored in parameter passing to the CDS entity in other CDS entities. Explicit actual parameters must be specified here, for example input parameters from the current entity or session variables.
  • The value #CLIENT of the annotation @Environment.systemField is particularly significant for client-dependent CDS table functions. If an input parameter is annotated like this, it is given the current client ID implicitly by the statement SELECT and can be used to restrict the result set in the platform-dependent implementation of the function. @Environment.systemField: #CLIENT cannot be specified in the case of client-independent CDS table functions.

Example

The following CDS view entity connects all input parameters with ABAP system fields and the SELECT list consists only of the input parameters. The ABAP program DEMO_CDS_SYSTEM_FIELDS accesses the CDS view entity, once with explicit and once with implicit parameter passing, and produces both results.






Fill RESBD Structure from EBP Component Structure   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.

Length: 9245 Date: 20240426 Time: 043448     sap01-206 ( 111 ms )