on ‎2021 Jan 07 10:00 AM
Hi,
I am new to Fiori Elements and sadly our backend ABAP version doesn't support CDS views. So I am using SEGW based OData service with additional annotation file in UI project. I have a requirement to show smart multi input control for 'plant' field to capture multiple plants in an Object Page.
I checked the documentation for this but it seems uncomplete to me as it doesn't has any annotation or metadata sample code. Could some one please provide an example for this case or guide me a little further? https://ui5.sap.com/1.65.0/#/topic/04ff5b1a81344a8e8169ea99630ff4e5
So I have two entities 'Variant' and 'Plant'. Here Variant is the main entity which has a 'Plant' property and 'ToPlant' navigation property based on following association
<Association Name="VariantToPlant" sap:content-version="1">
<End Type="ZTEST_EKANSH_SRV.Variant" Multiplicity="1" Role="FromRole_VariantToPlant" />
<End Type="ZTEST_EKANSH_SRV.Plant" Multiplicity="*" Role="ToRole_VariantToPlant" />
<ReferentialConstraint>
<Principal Role="FromRole_VariantToPlant">
<PropertyRef Name="VariantId" />
</Principal>
<Dependent Role="ToRole_VariantToPlant">
<PropertyRef Name="VariantId" />
</Dependent>
</ReferentialConstraint>
</Association>
'Plant' entity just has two properties 'PlantKey' and 'VariantId'.
The annotation for Plant field which I want to be as smart multi input field is as below (removed some extra fields):
<Annotation Term="UI.FieldGroup" Qualifier="GeneralData">
<Record Type="UI.FieldGroupType">
<PropertyValue Property="Data">
<Collection>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="Vendor" />
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="Plant" />
</Record>
</Collection>
</PropertyValue>
</Record>
</Annotation>
Based on this, currently it shows a normal smart field with only single select.

BR, Ekansh
Request clarification before answering.
Alright. I got it working with following changes:
<Record Type="UI.DataField">
<PropertyValue Property="Label" String="{@i18n>plant}"/>
<PropertyValue Property="Value" Path="ToPlant/PlantKey" />
</Record>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ekansh,
currently I also have the requirement to map a Multi Select Combobox. I am trying to implement the 1-N association in a RAP based service. So my question. Have you been able to finish your implementation? If so, can you publish the complete annotation here? I would like to compare this with mine 🙂
Best wishes Sebastian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sebastian,
In fact, I had to abandon the idea of using fiori element as the requirement went too complex and it had some limitation with my FES UI5 version. So I currently don't have access to the codebase for this but the all the annotations are added in my question and answer.
Hope it helps you in some way.
BR, Ekansh
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.