Concept of enumerations
When defining enumerations (German: enumeration objects), two things are created at the same time:
- A data type
- One or more constant values with this data type
TYPES: BEGIN OF ENUM ecolour,
colour_red,
colour_green,
colour_blue,
colour_yellow,
colour_orange,
colour_violet,
END OF ENUM ecolour.
At design time, the system checks that all assignments and comparisons always use exactly the same type. This means that it is not possible to use other values.