Skip to Content
May 09, 2020 at 04:26 PM

OData Enum Types in ABAP


oData V4 support enumeration types. I need advice on how to define enum type in a model define class for odata v4 model in classic ABAP programming? Thank you.

Example of metadata with enum type:

edmx:Edmx xmlns:edmx="" Version="4.0">
<Schema xmlns="" Namespace="">
<EnumType Name="XXXX" IsFlags="false" UnderlyingType="Edm.Int32">
<Member Name="WEEKLY" Value="0"/>
<Member Name="BIWEEKLY" Value="1"/>
<Member Name="SEMI_MONTHLY" Value="2"/>
<Member Name="MONTHLY" Value="3"/>
<EntityType Name="Create">
<PropertyRef Name="id"/>
<Property Name="id" Type="Edm.String"/>
<Property Name="Country" Type="Edm.String"/>
<Property Name="Town" Type=""/>
<Property Name="startDay" Type="Edm.String"/>
<Property Name="description" Type="Edm.String"/>
<EntityContainer Name="container">
<EntitySet Name="ViewSet" EntityType=""/>
<EntitySet Name="EventSet" EntityType=""/>