cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Analytical Table Example

0 Likes
15,953

Can someone share a working example of a analytical table?

I am trying to create a smart table type AnalyticalTable that will have subtotals for certain columns.

After searching the SAPUI5 documentation https://sapui5.hana.ondemand.com/#/topic/3d33684b08ca4490b26a844b6ce19b83

were I only found fragments views which I wasn't able to figure out.

Since I did not find a concrete tutorial for this online, I am asking anyone if he can be so kind as to share a simple example. Many thanks in advance!

View Entire Topic
maggie_zhang5
Product and Topic Expert
Product and Topic Expert

Hi,

I have created one example by using the List Report template of Fiori.

i.e., the smart table will consume the data from CDS view ZDEMO_CDS_SOI_WD, and we want to sum the value for the column "Amount".

1. Add annotation @DefaultAggregation: #SUM for "Amount".

2. Create the OData service. The CDS entity is marked as Analytical".

And for the "Amount", you will see following information in the metadata:

2. If your smart table is added by breakout, then in the fragement.xml, we also need to set the tableType as "AnalyticalTalbe" for the smart table:

Hope this will be helpful.

BRs, Maggie