cancel
Showing results for 
Search instead for 
Did you mean: 

SAP List Report - Hide & Disable Columns using UI Annotations

SaiNithesh_Gajula
Active Participant
5,741

Hi Experts,

I am working on SAP Fiori Element List Report app with Grid Table that uses an OData v2 service. We have column personalization button on the table. Currently the line item fields mentioned in UI.Annotations renders the default view and rest of the fields moved to the personalization button. We have a requirements as below

  1. We need to hide one field from the column personalization but it should be available for the filters. We have tried UI.Hidden but it didn’t worked.
<Annotation Term="UI.LineItem">
  <Collection>
	<Record Type="UI.DataField">
		<PropertyValue Property="Value" Path="field1"/>
		<Annotation Term="UI.Hidden" Bool="true"/>
	</Record>
  </Collection>
</Annotation>

2. We have to make couple fields(columns) has mandatory to display in table all the time, so how we can restrict the user to unselect those fields from the column personalization.

Please someone suggest how to achieve this.

SAP UI5 version: 1.71.29

Please do let me know, if you need any more details.

Regards,

Sai Nithesh

View Entire Topic
Lydie
Product and Topic Expert
Product and Topic Expert

Hi,

If someone is still looking for the answer to that question, here it is :

you need to use the UI.Hidden term in a seperate annotation, not in the lineitem one, because otherwise it wants to add the field to the table...

So it would give something like that :

<Annotations Target="YourODataService.YourEntitySet/field1" 
<Annotation Term="UI.Hidden" Bool="true"/>
</Annotations>
catalinfeidi
Participant
0 Kudos

I confirm. This is the solution if you want to display/hide fields via XML Annotation.