cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP CDS VIEW list report - Optimizing column width

former_member700233
Discoverer
0 Kudos

Hey guys,

I am building a fiori list report app with ABAP CDS VIEW. The cds view uses sorting, grouping and aggregation annotations, therefore the type of the table is Analytical.

When running the app from SAP WEB IDE I have this result:

I would like to know if there is a way we can optimize the column width, so that the width depends on the content of each field? A functionality that for now, I have it only if I double click on each column separator.

My manifest.json file of the app looks like this:

manifest.png

Thanks 🙂

Accepted Solutions (0)

Answers (2)

Answers (2)

raya_hemanth
Explorer

Hi,

Use different table type in manifest.json file. Below is an example.

"list": true,

"settings": {

"tableType": "ResponsiveTable",

"smartVariantManagement": true,

"condensedTableLayout": true

}

table type can be as below. Responsive table type adjusts column width accordingly.

  • ResponsiveTable
  • GridTable
  • AnalyticalTable
  • TreeTable
former_member700233
Discoverer
0 Kudos

Hi,

Thanks for your reply!

I tried your suggestion but when changing the table type to "ResponsiveTable" I am allowed a single level grouping only. I need to group the data by more than one field, therefore I cannot use the Responsive table.

former_member714630
Discoverer
0 Kudos

Raya - thank you; your post was very helpful.

Bricar
Discoverer
0 Kudos

This didn't appear to work for me when I changed the table type to ResponsiveTable.

abhishekanand12
Explorer
0 Kudos

Hello Bleona,

Please refer to the following documention related to table column width: https://sapui5.hana.ondemand.com/#/topic/a76525362b754354a85981a7389ca7af

Regards,

Abhishek

RaminS
Participant
0 Kudos

Abhishek,

I don't want to set the width of each column individually, I want all the columns to be optimized. Shouldn't that be the default behaviour?

It really makes for bad usability for Grid-table, when you don't see some of the columns, instead you see a lot of empty spaces in the first couple of columns.

Looping through each column and setting them optimized in an extension to a List Report template is not really ideal.