Documentation View

We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!

ABAPDATA_ENUM - DATA ENUM

ABAPDATA_ENUM - DATA ENUM

RFUMSV00 - Advance Return for Tax on Sales/Purchases   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
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.






RFUMSV00 - Advance Return for Tax on Sales/Purchases   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 3503 Date: 20221203 Time: 170552     sap01-206 ( 39 ms )