Application Development and Automation 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: 
Read only

Issue in Column Width Optimize in ALV

Former Member
0 Likes
2,444

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
Read only

Former Member
0 Likes
838

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

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
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
838

Build the fieldcatalog againa using fieldcatalog_merge.

Read only

Former Member
0 Likes
839

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