cancel
Showing results for 
Search instead for 
Did you mean: 

Date format in FIORI Elements List Report using Local Annotations

prasad
Participant
0 Kudos

Hi all,

we have a OData service generated for list report in which one of the field in metadata.xml is Edm.String which is maintained as in back end which is a 8 character field as below

<Property Name="Start_date" Type="Edm.String" MaxLength="8" sap:display-format="NonNegative"/><Property Name="End_date" Type="Edm.String" MaxLength="8" sap:display-format="NonNegative"/>

This field when used as a UI DataField in local annotations as below

<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="voyage_start"/>
<PropertyValue Property="Label" String="Voyage Start"/>
</Record>

we are getting the format as string as below

  • Can we format the date string in Fiori list report from UI side .
  • Maintain the column width to accommodate more fields in UI as if we have more than 8 fields all the fields are displayed down .

Regards

Prasad

Accepted Solutions (1)

Accepted Solutions (1)

maheshpalavalli
Active Contributor
0 Kudos

Hi Prasad,

I can see that the property metadata shows it is of type string. It ideally should of type date time then SAP will automatically converts it for you.

You can change the property type to datetime and check the output. But if you don't want to do that, then you have to do a column extension and do the formatting manually I guess so better update the property

BR,

Mahesh

prasad
Participant
0 Kudos

Hi Mahesh,

Thanks for the reply.

Can you share me the details for column extension example . would like to do at front end and also is there any way we can adjust the column width for the list report?

Regards

Prasad

maheshpalavalli
Active Contributor

https://ui5.sap.com/#/topic/28e95702b5854b938ac51c4bc2d078ab

You can generate extensions using webide as well.

Any reason they you don't want to change the type to date in odata service?

Mahesh

maheshpalavalli
Active Contributor

Answers (0)