cancel
Showing results for 
Search instead for 
Did you mean: 

Cap: grouping records with common fields

0 Kudos

Hello.

I'm trying to create a simple project on CAP. Can you tell me if it is possible to do something similar in the screenshot?

The list report does not show all the records at once, but they are grouped by a common field.
Technologies: CAP, Fiori(List Report), Node.JS, CDS, SAP Business Studio, Sqlite3

JWJ
Participant
0 Kudos

Hi. Did you get grouping to work on the List floorplan?

I am also trying to get grouping to work. I got the "Group" option to show up in the View Settings in the UI by changing to "Analytical" table type in the manifest and applying @Aggregation.ApplySupported.PropertyRestrictions : true to my table view. But when I try to apply the "Group" in the UI I then get an error popup saying "Feature is not supported: Transformation "3" with query option $apply" which appears to be in reference to the use of "concat" in the query, which according to the CAP docs (https://cap.cloud.sap/docs/advanced/odata#transformations) is not supported in Node.js.

Accepted Solutions (0)

Answers (2)

Answers (2)

gonzalomb
Discoverer

You can follow this blog !

Fiori Elements Analytical Table with CAP

For everyone who is trying this blog with CAP using the Node.js version instead of the Java version will possibly experience errors when doing groupings. This will fail because 'concat' is not available in the Node.js version.

GET BooksAggregate?$apply=concat(groupby((ID,category,title))/aggregate($count%20as%20UI5__leaves),groupby((category))/concat(aggregate($count%20as%20UI5__count), top(72))) HTTP/1.1.

You can check it in the documentation, there is also an experimental feature that enabling it in the package.json of your application will make it work correctly

Documentation

... 
"i18n": {
      "folders": [
        "i18n"
      ]
    },
    "features": {
      "odata_new_parser": true
    }
  },...
gregorw
Active Contributor
0 Kudos

You might want to check out my sample project sap-support-message-reporting.