cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Column width in list report does not adjust automatically - SAP Fiori Elements

lukasmetzger
Participant
5,578

Hello everyone,

I am currently working on a Fiori Elements Application inside a CAP Project.

While using the List Report and Object Page Template with OData V2, I am having a problem that the columns in the List Report table are somehow loaded with a fixed width:

The error occurred even without any annotations!

Has anyone of you had the same issue?

Thanks in advance!

Best regards,

Lukas

Accepted Solutions (0)

Answers (3)

Answers (3)

gregorw
SAP Mentor
SAP Mentor

Hi Lukas,

seems that with SAPUI5 1.87 the parameter enableAutoColumnWidth isn't experimental enymore. Please check What's New in SAPUI5 1.87. But at least for the column "Workplace max Am..." that doesn't look correct.

Best regards
Gregor

lukasmetzger
Participant
0 Likes

Hi Gregor,

thanks for your answer!!

According to this note in the documentation:

The space on the right side is actually intended. That is good to know, now I can try to get rid of it!

Best regards,

Lukas

lukasmetzger
Participant
0 Likes

Hi gregorw,

do you know how I can get the columns to fill out the whole row?

I can't find the right property in the documentation!

Thanks in advance!

Lukas

lukasmetzger
Participant
0 Likes

Hello again,

after a little bit of testing and generating, it seems to be a problem with applications that use the Versions > 1.86.3.

It think it is a general Problem.

Best regards,

Lukas

0 Likes

Hi lukasmetzger & gregorw ,

did you find a solution for this problem (automatic column width in OData v2 with Fiori Elements)? I just found the following Description of Changes for Responsive Table, but currently there is not a Guided Development in BAS available and the linked example for SAP UI5 is a controller implementation which I would like to avoid. I tried different positions for this code snippet "enableAutoColumnWidth = "true" " but I guess I still didn't find the correct one!

I hope you can help me 🙂

Kind Regards,
Vivienne

axel_brke3
Participant

Hi, I know this is pretty old but I was struggeling with this even with Flexible Programming Model and Odata V4. 

I'm leaving this here for others:
Make sure you reset your Table personalisation. This behavior occurs to me as well if I resized a single column via draggin it. Then the columns wont fill the table anymore

rounak_roy
Product and Topic Expert
Product and Topic Expert

FE LROP/ALP applications with responsive tables columns can now have an appropriate default width(enableAutoColumnWidth=true). Additionally, the end-user gets an option to resize the column width by click and drag.

The default column width can be annotated with HTML5.v1.CssDefaults Annotation for each fields in Lineitem.

Example:

<Annotation Term="com.sap.vocabularies.HTML5.v1.CssDefaults">

<Record>

<PropertyValue Property="width" String="10rem" />

</Record>

</Annotation>

As a consequence of the above change, responsive tables with fewer columns might see a visible change of table not occupying complete available space. This is the expected behavior as per the Design concept.

However, this will not have any impact on the functional behavior. Tables with more columns may not observe visual change as they occupy the available section width.

Ex: Table with only 3 columns launched in big screen.

EC
Participant
0 Likes

Hi, is it only available with fiori apps created with Odata V2? I cannot get the annotation enableAutoColumnWidth=true to work 😞