Skip to Content
avatar image
Former Member

SAP SmartForm Dropdown Annotation multiple key

Hey there,

I have a StatusSet which is related to a ObjectType. So now I want to create a fixed-value dropdown by the given objectType.

First I tried to use the value-help dialog and I set the ValueListParameterIn Annotation for my objectType filter. The result was more or less as expected. I see the value-help dialog with a predefined filter for the type and after pressing the start button I got my value list.

Now I want this as a fixed-value list (Dropdown). So I set the Annotation ValueListWithFixedValues with true. But here I got still an error by my service because the filter for the type is still missing.

Here my example:

<Annotations Target="ZTT_SRV.MyObject/AttValue">
	<Annotation Term="Common.ValueListWithFixedValues" Bool="false"/>
	<Annotation Term="Common.ValueList">
		<Record Type="Common.ValueListType">
			<PropertyValue Property="CollectionPath" String="MyObjectStatusSet"/>
			<PropertyValue Property="SearchSupported" Bool="true"/>
			<PropertyValue Property="Parameters">
					<Record Type="Common.ValueListParameterDisplayOnly">
						<PropertyValue Property="ValueListProperty" String="Name"/>
					<Record Type="Common.ValueListParameterIn">
						<PropertyValue Property="LocalDataProperty" PropertyPath="Type"/>
						<PropertyValue Property="ValueListProperty" String="Type"/>
					<Record Type="Common.ValueListParameterOut">
						<PropertyValue Property="LocalDataProperty" PropertyPath="AttValue"/>
						<PropertyValue Property="ValueListProperty" String="Id"/>
<Annotations Target="ZTT_SRV.MyObjectStatus/Id">
	<Annotation Term="Common.Text" Path="Name"/>

Another case with more dynamic is a relation between datafields. Its exactly the same example like the first but I have 2 dropdown fields.

The first dropdown have a value-list of objectTypes. The second has a value-list filtered by the objectType. As the result I want to see only a list of status by the defined objectType.

Can someone help me with a link to a resource or an example?

Cheers Jan

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Dec 19, 2017 at 04:42 PM


    If I understod you correctly, you need to use ComboBox.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      no. I'm using SmartForm instead of simple form components. The combobox in smartform is defined like this with the anntotation above...

      	<smartField:SmartField value="{ObjectType}">
      				displayBehaviour="description" />

      Here you'll find a SmartFrom Explored example.

      Now I need to filter the result of this combobox