Skip to Content

Column width optimzation for webdynrp table and ALV


I created a custom webdynpro application, where in we have an ALV and a table. i would need to incorporate Column Width Optimization, whatever is available in normal abap ALV. i tried with 'Set_fixed_table_layout', set_resizable as ABAP_TRUE etc. but of no use.

Did any one worked on the similar requirement? your inputs would be really appreciated.

Thanks in advance.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Mar 13, 2014 at 05:00 AM

    Hi Pallavi,

    By default in ALV , the column's width is optimized according to the content of its cell editor.

    If you mark the table as fixed layout, column width will not be preserved. hence SET_FIXED_TABLE_LAYOUT( ABAP_FALSE ) should give you the optimized width of columns based on its contents.

    Hope this helps you.



    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Rama,

      The issue here is, most of the time unleass the browser is resized manually, through out the application the browser size is fixed right. but we are not sure of the size of each column (which varies dynamiaclly, as we are going for column width optimization), need to calculate the width needed for each column before displaying and check how many columns can fit into disaplay .



  • Posted on Mar 13, 2014 at 05:26 AM


    Which Netweaver version you are on? The column width optimization/resize if available from Netweaver 7.0 Ehp1 onwards. You just have to set the set_fixed_table_layout to ABAP_TRUE.

    set_fixed_table_layout( ABAP_TRUE ).

    I guess you are on lower version of Netweaver, so you have to import the relevant support pack!

    Check the video by thomas here: WDA_Column_Resize5 | Flickr - Photo Sharing!

    Hope this helps u,



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 13, 2014 at 02:33 PM

    Hi Pallavi,

    i am not clear with your requirement

    i am assuming you are trying to achieve the following two:

    1) column width adjustment -> Ino need to do anything,its active by default in alv)

    2) Regarding the scrollbar, if you use activate the scrollable column, column width adjustment to the data still works provided you have more columns displayed than the scrollable column set.The scrollbar is also active.

    wd_this->lo_value->if_salv_wd_table_settings~set_scrollable_col_count( n ).

    n is less than the no of columns visible.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.