cancel
Showing results for 
Search instead for 
Did you mean: 

FIORI shows the same record 4 times instead of 4 different records

stepniake73
Explorer

I have prepared a service that correctly returns data to me (for example, I extract the last 4 records for a selected pernr from a database table).

When making a request on the entitiset, I get a beautiful status 200.

The data marked above is the information I am asking for (month + year + value).

Fiori shows me data as below:

In my opinion, the data entered the frontpage correctly (according to what comes out of the gateway), the list was filled in the right number of times (4 records passed), but the last record was displayed 4 times.

View.xml looks like this:

<mvc:View controllerName="zhcm_ess_perinf2.blocks.Blocks" xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m">
<mvc:XMLView viewName="zhcm_ess_perinf2.blocks.NoData" visible="{=${toGradeQuarterly}.length === 0}" />
<Table
items="{
path: 'toGradeQuarterly'
}"
>
<columns>
<Column>
<Text text="Rok"/>
</Column>
<Column>
<Text text="Miesiąc"/>
</Column>
<Column>
<Text text="Wartość"/>
</Column>
</columns>
<items>
<ColumnListItem >
<cells>
<Text text="{Rok}"/>
<Text text="{Mc}"/>
<Text text="{Zmocr}"/>
</cells>
</ColumnListItem>
</items>
</Table>
</mvc:View>
Sandra_Rossi
Active Contributor

To troubleshoot the problem, you'd better display the primary key (add pernr and begda?), just to make sure that the data origin is the same.

stepniake73
Explorer
0 Kudos

sandra.rossi - it did not help.

I added pernr and begda (Mc, Rok were keys all the time).

I have keys in my db table on: pernr, zropr, rok, mc, begda.

View Entire Topic
stepniake73
Explorer

I was so stupid 😉 I should mark columns as key in the gateway service builder (in my declaration -> data model -> entity types).

Now it works 🙂

DominikTylczyn
Active Contributor
0 Kudos

You were not stupid. You were wise to recognize your mistake and brave to share it with the community.