Add List of Values to Attributes in Data Model



For each attribute of an entity in our data model which requires a List of Values dropdown selection the following steps need to be followed.

1.  Create a Z-table for each drop down list required

You have to create a table to house the values that you require on the drop down list

1.1.1 Open Transaction SE11, and select the ‘Database table’ radio button

1.1.2 Type a name for your lookup table and click on ‘Create’

1.1.3 Add a short description, Select Delivery Class ‘C’ and ‘Display/Maintenance Allowed’


1.1.4 Click on the ‘Fields’ Tab and add the field and Data elements required in the table. Make sure the ‘Key’ checkboxes are checked where applicable. Save the Table.


1.1.5 Use the menu path: Goto -> Technical Settings. Enter ‘APPL2’ into the data class and select an appropriate size category. Save the Settings and Click ‘Back’


1.1.6 Activate your table, but do not exit.

1.1.7 You now need to be able to add your values to the table so; Use the Menu Path: Utilities -> Table Maintenance Generator

1.1.8 Enter ‘&NC&’ into the Authorization Group,  A valid function group in Function Group and select the ‘one step’ radio button.

1.1.9 Click on the ‘Find Scr. Number(s)’ button, and select the ‘Propose screen number(s) radio button.

1.1.10 Press the ‘Create’ button and Save. Now you can back out of all the screens.


2.     Add your list of values to your new table

You must now add the list of values into your table using the maintenance view you have created:

2.1.1 Open Transaction SM31

2.1.2 Type in your new table name and select ‘Maintain’

2.1.3 Select the ‘New Entries’ button and add in your list of values.

2.1.4 Click save and back out of the transaction.


3.     Create an Elementary Search Help

In order to link your new table back to your field you will need to create a search help

3.1.1 Open Transaction SE11 and select the ‘Search Help’ radio button.

3.1.2 Type a name for your search help and click on ‘Create’.

3.1.3 Select ‘Elementary search help’ and click the green tick.

3.1.4 Add a short description.

3.1.5 Enter your Table name into ‘Selection Method’.

3.1.6 Enter your field name in the table under ‘Search help parameter’ and press enter.

3.1.7 Select the ‘IMP’ and ‘EXP’ checkboxes.

3.1.8 Add ‘1’ into both the ‘LPos’ and ‘SPos’ fields.

3.1.9 Save and activate the search help.


3.1.10 You can use the test button (next to activate) to see that you list of values are pulling through, as shown below. You can now back out of the screens.


4.     Add the Search Help to the Data Element

You need to attach your search help to the data element it concerns.

4.1.1 Open Transaction SE11, Select the ‘Data Type’ Radio button, enter the name of the data element concerned and click ‘Change’

4.1.2 Click on the ‘Further Characteristics’ tab.

4.1.3 Enter your Search Help into ‘Name’ under the search tab subheading

4.1.4 Select the Parameter the data element relates to into ‘Parameters’ under the search tab subheading.


4.1.5 Save and Activate. You will receive a warning message of some dependencies which you can continue through. The activation will take some time.


5.     Adding Search Help to Data Model

To ensure the search help is used in MDG  you must enter it into the data model.

5.1.1 Open Transaction MDGIMG

5.1.2 Follow the menu path General Settings -> Data Modeling -> Edit Data Model

5.1.3 Select the line for data model ‘MM’ and click the ‘Entity Types’ folder

5.1.4 Select the line for the entity you are working on (e.g. MATERIAL) and click the ‘Attributes’ folder.

5.1.5 Find the attribute you have created a search help for and enter your search help into the ‘Search Help’ Column.

5.1.6 Save your changes.

5.1.7 Double click the folder ‘Inactive Data Models’ Select and activate the Data Model.


6.     Adding Text to UI for Custom Fields  

Follow the steps below to display text for custom fields that have a Z table defined to hold the values

6.1.1 Create ZTable as in example

6.1.2 Add ZTable as Value table on the Domain

6.1.3 Create Maintenance View

6.1.4 Create ZTextTable

6.1.5 z5.JPG

6.1.6 Specify Foreign Keys for the ZTextTable fields


6.1.7 Create Maintenance View for ZTextTable

6.1.8 Create Search Help using key from ZTable & Text from ZTextTable

6.1.9 Activate Data Model

6.1.10 Run USMD_ADJUST_STAGING report in SE38

6.1.11 Regenerate the data model structures using the following path:
MDGIMG -> General Settings -> Data Modeling ->Generate Data Model -Specific Structures->Select Data Model -> Structures ->Highlight relevant structures, i.e.   Material -> Generate Selected Structures

6.1.12 Text fields should now be available for use in UI

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply