Skip to content

ABAP Keyword Documentation →  ABAP - Dictionary →  Classic Objects in ABAP Dictionary →  Data Types →  Structures →  Dictionary DDL for Structure Definitions →  DEFINE STRUCTURE →  DEFINE STRUCTURE - component 

DEFINE STRUCTURE - component_annos

Other versions: 7.31 | 7.40 | 7.54

Syntax


[@EndUserText.label : '...'] 
[@Semantics.amount.currencyCode : 'struct.comp']
[@Semantics.quantity.unitOfMeasure : 'struct.comp']

Effect

Applies annotations to specify optional properties of a component in the definition of a structure using the statement DEFINE STRUCTURE in Dictionary DDL.

  • @Semantics.amount.currencyCode - Definition of a reference field for a currency field. A component comp with the built-in dictionary type CUKY from the same or from a different structure struc must be specified in quotation marks.
  • @Semantics.quantity.unitOfMeasure - Definition of a reference field for a quantity field. A component comp with the built-in dictionary type UNIT from the same or from a different structure struc must be specified in quotation marks.


Note

The syntax used to specify the properties is based on CDS annotations. There are, however, no visible associated annotation definitions.


Example

Defines the component weight_unit as a reference field for the quantity field weight in the same structure.

...
define structure struct {
  ...
  @Semantics.quantity.unitOfMeasure : 'struct.weight_unit'
  weight :      abap.quan(2);
  weight_unit : abap.unit(2);
  ...
  }