Skip to Content

ui5 table shows same records

Aug 29, 2017 at 01:45 PM


avatar image

Hi All,

I'm facing an error while showing the data in ui5 table. We have two time related fields in the table where we have exposed via XSodata service. Problem is while displaying the data in the ui5 table all the time related columns are displaying the same time for eg (19:08 ,20:08 , 14:08 etc).ed which is shown in below screenshot.

When i check the data in my odata output url i'm getting the same data as we have in the table.

below is my output of the ui5 table which has issues in columns Start time and End time

Below is the metadata of the XSODATA service.

<EntityType Name="monload_serviceType">
<PropertyRef Name="GENERATED_ID"/>
<Property Name="GENERATED_ID" Type="Edm.String" Nullable="false" MaxLength="2147483647"/>
<Property Name="USERID" Type="Edm.String" MaxLength="10"/>
<Property Name="SOURCE" Type="Edm.String" MaxLength="10"/>
<Property Name="DATASET" Type="Edm.String" MaxLength="10"/>
<Property Name="DATE" Type="Edm.DateTime"/>
<Property Name="START_TIME" Type="Edm.DateTime" Nullable="false"/>
<Property Name="END_TIME" Type="Edm.DateTime"/>
<Property Name="STATUS" Type="Edm.String" MaxLength="20"/>
<Property Name="ERROR" Type="Edm.String" MaxLength="50"/>

Code of data binding from View.js

template: new sap.ui.commons.TextView().bindProperty("text",{ path : "START_TIME" , type: new sap.ui.model.type.DateTime({pattern: "HH:MM:SS X"})});

template: new sap.ui.commons.TextView().bindProperty("text",{ path : "END_TIME" , type: new sap.ui.model.type.DateTime({pattern: "HH:MM:SS X"})}),

Please help with your valuable inputs.



table-output.png (17.6 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Jun Wu Aug 29, 2017 at 02:28 PM

if your odata is wrong, nothing to do with the ui5

where is your xs code

Show 4 Share
10 |10000 characters needed characters left characters exceeded

in XSodata file i have just written a single line to expose the data .


"T_DL_MON_UI5" as "monload_service" keys generate local "GENERATED_ID";


Correct me if I'm wrong with the XSodata definiation.

Below is the example of one property where you can see dates are coming correctly. Kindly suggest where i need to correct.

<d:GENERATED_ID m:type="Edm.String">48571820155014911</d:GENERATED_ID>
<d:USERID m:type="Edm.String">1101</d:USERID>
<d:SOURCE m:type="Edm.String">EFR</d:SOURCE>
<d:DATASET m:type="Edm.String">ACTUAL</d:DATASET>
<d:DATE m:type="Edm.DateTime">2017-08-29T00:00:00.0000000</d:DATE>
<d:START_TIME m:type="Edm.DateTime">2017-08-29T13:18:06.0000000</d:START_TIME>
<d:END_TIME m:type="Edm.DateTime">2017-08-29T13:59:54.0000000</d:END_TIME>
<d:STATUS m:type="Edm.String">Completed</d:STATUS>
<d:ERROR m:type="Edm.String"/>

Hi Jun,

Can you please help me on this?




bind to odata model if it is not the case now.


I have already bind the table with odata model . Here it is.

All other columns are coming correctly but which is having the time values those are not populating correctly.