cancel
Showing results for 
Search instead for 
Did you mean: 

Bind rows to a sap.ui.table.AnalyticalTable

0 Kudos
1,051

Hi,

I have an ODATA service (with vocabulary based annotations) that returns data along with annotations. I need to display an Analytical Table (ALV) so that I can use features such as grouping, aggregations, etc.

My OData model contains the correct annotations. However, when I try to bind the sap.ui.table.AnalyticalTable using rows="{/EntitySetName}", no data appears in the table. There are no errors in the console as well.


<table:AnalyticalTable rows="{path:'modelName>/EntitySetName',

                                      parameters: {numberOfExpandedLevels : 1 }

                                      }">

  <table:columns>

       <table:AnalyticalColumn>

            <Text text="Column 1" />

            <table:template>

                 <Label text="{modelName>PropertyName1}"></Label>

            </table:template>

       </table:AnalyticalColumn>

       <table:AnalyticalColumn>

            <Text text="Column 2" />

            <table:template>

                 <Label text="{modelName>PropertyName2}"></Label>

            </table:template>

       </table:AnalyticalColumn>

  </table:columns>

  </table:AnalyticalTable>

If instead of a <table:AnalyticalTable> I use a <table:Table> the rows binding works fine and I am able to see the data in the table.

Does anyone know how to bind data to the AnalyticalTable ?

Regards,

Melwyn

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hope this helps

SAPUI5 Explored

0 Kudos

Hi Rajeesh,

I wish to use a sap.ui.table.AnalyticalTable instead of a SmartTable as I need to customize the cells to have icons, buttons, etc. which I am unable to achieve if I use SmartTable tag


<SmartTable tableType="AnalyticalTable" editable="false"

  enableAutoBinding="true" entitySet="ProductCollection"

  useVariantManagement="true" persistencyKey="PKeyAnalyticalExample5"

  useTablePersonalisation="true" header="ProductCollection"

  showRowCount="true" useExportToExcel="false" />

If there is a way that I can achieve it using SmartTable tag then it would serve the purpose.

Regards,

Melwyn

sdebeaulieu
Participant
0 Kudos

Hi Melwyn,

I have exactly the same need than you and also the same issue. Have you found a way to bind rows to your AnalyticalTable?

When I'm using a Table element with rows="/MyEntitySet" or a SmartTable with entitySet="MyEntitySet", the rows binding works fine...

May you help me?

Cheers,

Severin

former_member82178
Active Participant
0 Kudos

Hi Severin,

Please check below link if that help.

https://scn.sap.com/thread/3913823

Regards,

Madhu Sudhan

sdebeaulieu
Participant
0 Kudos

Thank you Madhu.

I understand that it's impossible to use directly an AnalyticalTable without a SmartTable. It's weird, because other features of AnalyticalTable documentation work well, there is just the rows binding who is problematic. And it's a shame because I really need to customize some features...

May someone confirm that it's impossible to use directly an AnalyticalTable?

Cheers,

Severin