on ‎2019 Jul 12 3:59 PM
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!
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 13 | |
| 8 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.