Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Smart Table - Field selection by default

Hi Experts,

I am working on smart tables. In the detail page i could able to view columns only with data type "Edm.String"

but i also have columns with "Edm.DateTime" which is not showing by default as shown below.

Every time i have to select manually to display as shown below,

Now i could able to view the details.

Instead of showing all the columns, i have to display few fields irrespective of data type.

Metadata.xml

<Property Name="RiskValidFrom" Type="Edm.DateTime" sap:display-format="Date"

  sap:label="Risk Valid From" sap:creatable="false" sap:updatable="false"

  sap:sortable="true" sap:required-in-filter="true" />

  <Property Name="RiskValidTo" Type="Edm.DateTime" sap:label="Risk Valid To"

  sap:creatable="false" sap:updatable="false" sap:sortable="true" sap:display-format="Date"

  sap:required-in-filter="true" />

<Property Name="ControlValidFrom" Type="Edm.DateTime" sap:display-format="Date"

  sap:label="Control Valid From" sap:creatable="false" sap:updatable="false"

  sap:sortable="true" sap:required-in-filter="true" />

<Property Name="ControlValidTo" Type="Edm.DateTime" sap:label="Control Valid To"

  sap:creatable="false" sap:updatable="false" sap:sortable="true" sap:display-format="Date"

  sap:required-in-filter="true" />

Annotation

<Record Type="com.sap.vocabularies.UI.v1.DataField">

  <PropertyValue Property="Date" Path="RiskValidFrom" />

  </Record>

  <Record Type="com.sap.vocabularies.UI.v1.DataField">

  <PropertyValue Property="Date" Path="RiskValidTo" />

  </Record>

<Record Type="com.sap.vocabularies.UI.v1.DataField">

  <PropertyValue Property="Date" Path="ControlValidFrom" />

  </Record>

  <Record Type="com.sap.vocabularies.UI.v1.DataField">

  <PropertyValue Property="Date" Path="ControlValidTo" />

  </Record>

Please help to resolve this.

Thanks,

Gowtham

Tags:
replied

Hi All,

I am closing this thread as i got the solution mentioned below.

  <Record Type="com.sap.vocabularies.UI.v1.DataField">

  <PropertyValue Property="Date" Path="ControlValidTo" />

  </Record>

In annotation area i have changed the property as 'value' instead of 'Date'.

This is working fine now

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question