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!
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.
Hello,
There is some blogs talking about this subject such as those :
If your problem is the starting point in freestyle application, you can first play with Fiori Elements List report floorplan. To do it, in the easiest way, you will have to do :
If you follow all those steps in 30 minutes (even less) you will have Analytical table.
Regards,
Joseph
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joseph,
Thanks for providing a solution above, but this won't work for me since we are operating in a public cloud ( S4HANA Cloud ) environment and we do not have access to the backend system. We can only create CDS's using the "Custom CDS" Tile but I failed to see any way to set the aggregation for the fields.
In my app, I already exposed the CDS, but I wanted to implement the ALV and it would be nice to see a sample code for the UI implementation using smarttable.TableType.AnalyticalTable .
User | Count |
---|---|
66 | |
11 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.