SAP Tutorials Blog


 


"When creating enumerated types, an enumerated structure can optionally be declared in 

"the context of the type declaration.

"A component of an enumerated structure: An enumerated constant that exists as a component

"of a constant structure, not as a single data object.

TYPES basetype TYPE i.

TYPES: BEGIN OF ENUM t_enum_struc STRUCTURE en_struc BASE TYPE basetype,

         a VALUE IS INITIAL,

         b VALUE 1,

         c VALUE 2,

         d VALUE 3,

       END OF ENUM t_enum_struc STRUCTURE en_struc.


DATA(enum_comp) = en_struc-b.


DATA(conv_enum_comp) = CONV basetype( en_struc-b ).

ASSERT conv_enum_comp = 1.


Serkan AKKAVAK

Computer Engineer BSc

Head of SAP & Software Department

Contact : serkurumsal@yandex.com