cancel
Showing results for 
Search instead for 
Did you mean: 

Adjusting Column width on Web Dynpro ALV

arunpregash_s
Explorer
0 Kudos

Hello Colleagues,

Is it possible to adjust the column width of a select column in ALV grid after it has been posted to the IE. If yes, then what parameters should be passed to the component or what settings do we need to make??.

Can you please help me out...

Thanks and best regards,

Arun Pregash S

Accepted Solutions (1)

Accepted Solutions (1)

arunpregash_s
Explorer
0 Kudos

Hello Abhi,

Yes I saw the feature of dragging and dropping a select column according to the users wish in the latest version, but still the possibility of adjusting/ resizing the column width is not there. Is there any other way to overcome this/Is there any development going on for incorporating this feature in the near future.

Thanks for your help

Regards,

Arun

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Thomas is the right person to answer this question

If it is not present in 7.0 Ehp1

you can add your suggestions to this thread

Abhi

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

That functionality is there in 7.0 Enhp1. It works for standard tables and ALV. You only have to set the fixedTableLayout property to True. Here is a video of it:

http://www.flickr.com/photos/tjung/2806011790/

laeeqsiddique
Participant
0 Kudos

Hi Thomas,

My client has recently upgraded to EP4 ECC 6.0 and I can see drag & drop functionality but I don't see resizing functionality in ALV & table control. Do you think anything need to done? or are we missing something.

Regards,

Laeeq Siddique.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

For ALV you have to set the fixedTableLayout parameter to true. Otherwise there is no resize option.

data l_table type ref to cl_salv_wd_config_table.

...

l_table->if_salv_wd_table_settings~set_fixed_table_layout( abap_true ).

Answers (5)

Answers (5)

arunpregash_s
Explorer
0 Kudos

Hello Thomas,

We work with SCM SNC. It is delivered to customers with NW7.0. I just meant to ask you that if it is possible with NW7.0. But I can see that it is possible with NW7.01 EnhP. Thanks for your inputs and suggestion.

Best regards,

Arun

arunpregash_s
Explorer
0 Kudos

Hello Thomas,

I understand that this is possible in 7.0. Thanks for your help. But one final question, Is there a way to downport it to lower release also??

Thanks and best regards,

Arun Pregash S

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> Hello Thomas,

> I understand that this is possible in 7.0. Thanks for your help. But one final question, Is there a way to downport it to lower release also??

>

> Thanks and best regards,

> Arun Pregash S

What lower release did you have in mind? Web Dynpro ABAP only came to be with NetWeaver 7.0. This functionality is being delivered to NetWeaver 7.0 via Enhancement Package 1. We can't downport it any further as Web Dynpro itself doesn't exist on lower releases.

arunpregash_s
Explorer
0 Kudos

Hello Lekha and Ramanan,

Thanks for your help. But my concern is that will the ALV Grid for WebDynpro support the feature as available in the SAP GUI.

I.e . In SAP GUI it is possible for us to adjust the column width on the UI using your mouse pointers. Similarly does the ALV grid for Web supports this feature once it is posted to the browser say your UI here is the IE...??.

Sorry if I have not conveyed my question properly..

Thanks and best regards,

Arun Pregash S

abhimanyu_lagishetti7
Active Contributor
0 Kudos

>I.e . In SAP GUI it is possible for us to adjust the column width on the UI using your mouse pointers. >Similarly does the ALV grid for Web supports this feature once it is posted to the browser say your UI >here is the IE...??.

You don't have this feature so far, how ever you can drag and drop and arranging the columns as per your requirement is possible from 7.0 Ehp1

Abhi

Pramanan
Active Participant
0 Kudos
  • create an instance of ALV component

DATA: LR_IF_CONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE,

LR_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE,

LR_CMDL TYPE REF TO CL_SALV_WD_CONFIG_TABLE,

LR_TABLE_SETTING TYPE REF TO IF_SALV_WD_TABLE_SETTINGS.

LR_CMP_USAGE = WD_THIS->WD_CPUSE_ALV( ).

IF LR_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.

LR_CMP_USAGE->CREATE_COMPONENT( ).

ENDIF.

    • get reference to the ALV model

LR_IF_CONTROLLER = WD_THIS->WD_CPIFC_ALV( ).

LR_CMDL = LR_IF_CONTROLLER->GET_MODEL( ).

LR_TABLE_SETTING ?= LR_CMDL.

    • Set column width

DATA LR_COL TYPE REF TO CL_SALV_WD_COLUMN.

LR_COL = LR_CMDL->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'PERNR' ).

LR_COL->SET_WIDTH( '70' ) .

LR_COL = LR_CMDL->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'ENAME' ).

LR_COL->SET_WIDTH( '100' ) .

LR_TABLE_SETTING->SET_FIXED_TABLE_LAYOUT( ABAP_TRUE ).

Also refer

webdynpro component SALV_WD_TEST_TABLE_PROPs

Go for view TABLE and method SET_COLUMN_SETTINGS

If you want to change it in IE. Have a separeinput parameters and pass that value to set_width.

I hope this will help you

Former Member
0 Kudos

Hi,

We have to use interface like

IF_SALV_WD_COLUMN_SETTINGS in that we have a method called GET_COLUMN and also SET_WIDTHand finnaly we have to use this interface IF_SALV_WD_TABLE_SETTINGS to save the table settings ie to reflect the changes in that table.

Pls refer to this link below

This thread solves your isssue.

Regards

Lekha