Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in Column Width Optimize in ALV

Former Member
0 Kudos

Hi,

I am working with ALV custom container and ALV grid.

I have set column optimize indicator in the layout.

When a button is clicked in appln tool bar, a new entry is added in

the internal table and the alv will be refreshed.

But the column optimize is not working properly. Column width is not

optimized as per the newly added row fields.

How can i achieve the column width optimize with the new rows added ?

Thanks,

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Giri,

before refresh_table_display get the frontend layout and set the modified layout


 CALL METHOD grid2->get_frontend_layout
*    IMPORTING
*      es_layout =  <structure of type LVC_S_LAYO > .
      .
      
  CALL METHOD grid2->set_frontend_layout
    EXPORTING
      is_layout =  <structure of type LVC_S_LAYO > .
      .

refresh the table display..

hpe it helps..

Regards,

Mdi.Deeba

2 REPLIES 2

Sandeep_Kumar
Product and Topic Expert
Product and Topic Expert
0 Kudos

Build the fieldcatalog againa using fieldcatalog_merge.

Former Member
0 Kudos

Hi Giri,

before refresh_table_display get the frontend layout and set the modified layout


 CALL METHOD grid2->get_frontend_layout
*    IMPORTING
*      es_layout =  <structure of type LVC_S_LAYO > .
      .
      
  CALL METHOD grid2->set_frontend_layout
    EXPORTING
      is_layout =  <structure of type LVC_S_LAYO > .
      .

refresh the table display..

hpe it helps..

Regards,

Mdi.Deeba