cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop columns from resizing in WD table?

former_member195355
Participant
0 Kudos

Hiya,

I've created a nice (non-ALV) table in web dynpro.

It's lovely, the only problem is that the width of the table columns always adjusts to the column contents.

So a narrow column when it just says 'Pizza' but a wider column when it says 'Chicken Rojan Josh'.

This leads to a disjointed user experience when scrolling down the table contents.

I thought this'd be easy but I can't seem to figure out how to stop the table columns from resizing?

Would anyone know?

Thanks in advance!

Accepted Solutions (1)

Accepted Solutions (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi,

Set the check box of property  fixedTableLayout of table and you need to set the width of columns manually , so that the column width remains same at all the time.

Refer the help document;

Table Properties -  Web Dynpro ABAP - SAP Library

Hope this helps you.

Regards,

Rama

Answers (3)

Answers (3)

former_member195355
Participant
0 Kudos

Thanks for the info!

One thing that confuses me is the size unit for width. I would like the size to be 10 characters, which unit would most closely resemble a character is it ex?

Thanks in advance!

former_member197475
Active Contributor
0 Kudos

Hello,

Are you meaning for the length of the CHAR field. If it is yes, go ahead for CHAR10 or CHAR10_ALV.

BR,

RAM.

Former Member
0 Kudos

Hi,

If your attribute(i.e the attribute to which the table column has been binded) has Z-domain,set the length = CHAR 10.

Thanks

KH

former_member195355
Participant
0 Kudos

Sorry for not being clear. I meant within the width box of a WD:

Which size unit for width is best.

I would like the size to be 10 characters, but this width doesn't accept characters as a size unit...? So which unit would most closely resemble a character is it ex?

former_member197475
Active Contributor
0 Kudos

Hi,

You can just enter the approximate range, 100, 150 and hit on the Enter button.

This will be like your trial method. You can just enter the values and correct it based on the screen output.

BR,

RAM.

Former Member
0 Kudos

Hi,

For normal table,select the column and set its width as per your requirement.PFB the snapshot for reference.

Thanks

KH

harsha_jalakam
Active Contributor
0 Kudos

Hi,

You need to set the fixed layout of the ALV table , to avoid re-sizing.

Below is the sample code.

DATA: lo_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .

lo_INTERFACECONTROLLER =   wd_this->wd_cpifc_sflight_alv( ).

  DATA; lv_value TYPE ref to cl_salv_wd_config_table.

  lv_value = lo_interfacecontroller->get_model(  ).

lv_value->IF_SALV_WD_TABLE_SETTINGS~set_fixed_table_layout( abap_true ).

Thank You,

Harsha