Creating Custom Enumerations
You use custom enumeration types to display a list of items in dropdown menus of selection fields in user interfaces.
You have created a project in SAP NetWeaver Developer Studio and it is available in the Service Explorer. For more information, see Creating Development Component Projects.
1. Create a custom data type of type string in the dictionary model. To do so, do the following:
a. Open the dictionary perspective with Window → Open Perspective → Other →Dictionary.
b. In the Dictionary Explorer expand your project and go to Dictionaries → Local Dictionary → Data Types → Simple Types.
c. With the secondary mouse button, choose Create Simple Type.
d. In the New Simple Type window, enter a name and choose Browse to select the customtypes package.

By specifying the customtypes package, you indicate that CAF should take the runtime enumeration definitions (these will be defined in step 3), not those defined in the dictionary model.
e. Choose Finish.
f. From the dropdown menu for Built-In Type, select the data type (for example, string) and define any length constraints.
g. In the Representations tab page, fill out the corresponding fields.
h. In the Dictionary Explorer, go to the custom type you just created (Dictionaries → Local Dictionary → Data Types → Simple Types →<custom type>) and choose Add to Public Part with the secondary mouse button.
i. In the Public Part Editor select types_compilation and choose OK. Repeat the previous step also for types_assembly.
You do this so that the type that you created is available in the data type selection list when you create new entity service attributes.
2. Assign the data type to an entity service attribute.
You will find your newly created simple type in the customtypes package. See Modeling Entity Services for more information on entity service creation.
3. Create a CustomEnumType of the same name on the server and define the selection options.

Go to http://<host>:<port>/caf → Administrative Tools of the CAF Runtime Configurator to maintain the enumeration types with the Custom Type Editor.
a. Enter the custom type name you created in step 1 above in the field Type and choose Add.
For example, com.sap.carpool.customtypes.salutation.
b. From below the table, choose Add and maintain the enumeration selections in the columns Key and Value.
c. Choose Save.
At runtime, the system will detect that this attribute is not based on a simple data type, but rather on an enumeration. This means a selection list, based on the entity service attribute you assigned it to, is generated in the UI.