cancel
Showing results for 
Search instead for 
Did you mean: 

Odata result don't show correctly in smart table

former_member275924
Active Participant
0 Kudos

Hi experts,

I create the smart table and set with entityset of odata . Although the return results are 150 records , the row count show 250 and after scrolling it change to 400 records .

After writing the paging logic in abap , all of the records are 150 and the return data is 132 records , but row count still 250 and the data don't show correctly in smart table . after scroll the table , the row count goes to 150 and the data show correctly .

I don't know why the smart table can't show correctly .

Best Regards,

Phyo

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member275924
Active Participant
0 Kudos

The result screen shot

MioYasutake
Active Contributor
0 Kudos

What are the keys of your entity?

Unless all the keys are displayed, SmartTable cannot show correct data set.

former_member275924
Active Participant
0 Kudos

Hi Yasutake ,

Thanks for your reply .

The entity of the key is ID and I set the value in count .

eg , the result count is 150 , the value of the ID set 0000000001 to 0000000150 .

Best Regards,

Phyo

MioYasutake
Active Contributor
0 Kudos

Hi Phyo,

Is "ID" visible on the List Report?

former_member275924
Active Participant
0 Kudos

Hi Yasutake,

Thanks for your reply,

There is no changes in table whether ID visible or not .

Actually I don't know show the ID in table .

Could you please check the figure .

MioYasutake
Active Contributor
0 Kudos

In the case Actually I don't know show the ID in table,

Press a gear icon on the top right corner of the table, and add 'ID' column to the table.

Please not that this setting is temporary and you have to adjust annotation to make the filed always visible.

former_member275924
Active Participant
0 Kudos

Hi Yasutake,

Sorry for my wrong explanation .

[ Not ⇒Actually I don't know show the ID in table,

Actually I don't want to show the ID in table ]

I already checked the ID , there is no duplicate record and the result doesn't change whether ID show or not in table .

Thanks for your time ,

Phyo

0 Kudos

Hi Phyo,

I am facing the same issue. Did you find a solution?

Thank you

Sam

junwu
Active Contributor
0 Kudos

most likely your own coding error. smarttable just display what your odata supplied.

former_member275924
Active Participant
0 Kudos

Hi Jun Wu,

Thanks for your reply ,

when I check the the return result , the count is 150 in backend and frontend .

I doubt the table of threshold but I didn't set the visible row count and threshold in table .

Thanks and best regards,

Phyo

junwu
Active Contributor
0 Kudos

do you know there is a count call?

the total number shown above the table has nothing to do with the result record number.

former_member275924
Active Participant
0 Kudos

Hi Jun Wu,

I know the count call .

The main problem is only the count that show in table header.

Binding the data is wrong in table .

Although the result data is 132 , the binding length is 232 .

Could you please check the figure .

Best Regards,

Phyo

junwu
Active Contributor
0 Kudos

if you know count call, then you should ask yourself why your code is giving 400 when scrolling.

you should debug your pagination code.

junwu
Active Contributor
0 Kudos

is it a normal grid table? or analytic table?

former_member275924
Active Participant
0 Kudos

Hi ,

Here is the table structure.

<smartTable:SmartTable id="LineItemsSmartTable" header="支払一覧" persistencyKey="Zbukr" entitySet="GET_PAYMENT_DETAIL"
smartFilterId="smartFilterBar" tableType="Table" showVariantManagement="true" useExportToExcel="false" useVariantManagement="true"
useTablePersonalisation="true" showRowCount="false" enableAutoBinding="false"
beforeRebindTable="onBeforeRebindTable" customData:lineItemQualifier='LineItem_Display' ignoredFields='Vblnr,Kunnr,Empfg,Name1'
displayInline="true">
<!--header="支払一覧"-->
<smartTable:customToolbar>
<m:OverflowToolbar design="Transparent">
<m:ToolbarSpacer/>
<m:Button id="downloadButton" text="支払通知書データダウンロード" press="onDownload" enabled="false"/>
<m:Button id="hdDownloadBtn" icon="sap-icon://excel-attachment" press="onBeforeExport"/>
</m:OverflowToolbar>
</smartTable:customToolbar>
<!--visibleRowCount="1000" threshold="1100"-->
<table:Table id="DetailsTable" visibleRowCountMode="Auto" rowHeight=" 30%" rowSelectionChange="onSelectionChange"
busyStateChanged="onTableUpdateFinished"></table:Table>
<smartTable:layoutData>
<m:FlexItemData growFactor="1" baseSize="0%"/>
</smartTable:layoutData>
</smartTable:SmartTable>