Ansicht
Dokumentation

ABAPDATA_ENUM - DATA ENUM

ABAPDATA_ENUM - DATA ENUM

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

DATA, TYPE, LIKE enum

Short Reference



DATA enum_var ${ ${TYPE enum_type$}
              $| ${LIKE enum_dobj$} $}
              $[VALUE val$|${IS INITIAL$}$]
              $[READ-ONLY$].

Effect

Declaration of an enumerated variable. An enumerated variable is declared by:

  • LIKE reference to a data object with enumerated type. The following options are possible:

  • Existing enumerated variables

The data type of an enumerated variable is its enumerated type. The enumerated type prescribes the enumerated values that an enumerated variable can contain. The assignment rules for enumerated types and the allowed operand positions for enumerated variables ensure that only allowed enumerated values can be assigned to an enumerated variable.

The technical type of the enumerated value in an enumerated variable is the base type of the enumerated type. It is always a flat elementary type with a maximum length of 16 bytes.

Note

For more information about using enumerated variables, see enumerated objects.

Example

In this example, three enumerated variables are declared:

  • color1 by a TYPE reference to the enumerated type colors
  • color2 by a LIKE reference to color1

Each enumerated variable is assigned a valid value. The output shows the name of the assigned enumerated constant and the actual value for each enumerated variable. A special rule for the conversion operator CONV is used for the latter.






ROGBILLS - Synchronize billing plans   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 3517 Date: 20240328 Time: 142824     sap01-206 ( 51 ms )