Skip to Content
avatar image
Former Member

Smart Table with sums or (sub-)totals

Hi all,

i'm trying to build a smart table which should showcase some figures and data.

At the moment the smart table shows the data but without calculating subtotals or sums. I already tried to use an AnalyticalTable or a smarttable with tabletype=analyticaltable. Both were not functional on our server (SAP NetWeaver 7.40 SP 9).

The latter atleast worked on the WebIde but had no working sums. If anyone can point me to a good example of an implementation of such a smart table, that would be great as i was not able to find one.

EDIT:

After some Trial-and-Error I was able to start a Smart Table with some data but now I'm getting the another error. It is the same error when browsing the Explored-Sample .

https://sapui5.hana.ondemand.com/explored.html#/sample/sap.ui.comp.sample.personalization.example5/preview


When selecting the column Price und grouping by something for example Product Category the result does not seem right. It is nocht grouping well and the sum is not correct calculated. Any help is appreciated.

Here is the metadata, if it helps:

If you need more informations, just let me know.

Thanks in advance,

Sven

metadata.jpg (239.6 kB)
tabelle.jpg (133.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Mar 15, 2017 at 09:11 AM

    Do you have any advice for the above? Any idea could help.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 15, 2017 at 09:59 AM

    I am facing the same problem. Groups are duplicated and subtotals are not shown correctly. Only first value is displayed. :(

    Any help is appreciated.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 19, 2017 at 08:31 PM

    Hi Sven,

    did you find a solution for that? I'm facing the same problem :(

    I tested it without having a "measure" aggregation-role, the grouping worked properly but as soon as I want to show totals, the grouping doesn't work.. -.-

    Best regards,

    Mike

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 21, 2017 at 12:21 PM

    Hi Sven,

    As a SAP UI5 developer I can tell you that the example: https://sapui5.hana.ondemand.com/explored.html#/sample/sap.ui.comp.sample.personalization.example5/preview is only about the sap.ui.comp.personalization.Controller. Many the analytical aspects of the sample do not work correctly, because it is using the SAP UI5 mock server which is incapable of correctly answering "analytical request" by default.

    "The AnalyticalTable only works with an AnalyticalBinding and correctly annotated OData services. Please check on the SAP Annotations for OData Version 2.0 documentation for further details." - from https://sapui5.hana.ondemand.com/#docs/api/symbols/sap.ui.table.AnalyticalTable.html

    From all I know, the grand total and sub total calculation is done in the backend and only requested be the analytical binding. These requests need to be properly answer by the OData Service in the back end.

    Roughly speaking the annotations in the metadata.xml need to be correct, so that the analytical table and analytical binding and it's helpers can send correct requests to the back end and the OData Service needs to answer them correctly.

    This link might be helpful in setting up an OData Service for Analytical Queries https://archive.sap.com/documents/docs/DOC-34801

    Kind Regards,

    Peter.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 07 at 01:37 PM

    Hi all,

    I have the same problem. Did the subject have a solution?

    Add comment
    10|10000 characters needed characters exceeded