09-24-2008 4:35 PM
Columnwidth optimise is not working in my case. I know its very simple, just set lvc_s_layo-col_opt = 'X' in layout and pass it to grid in method set_table_for_first_display.
Surprisingly, when I open the layout of grid, it show checkbox 'Optimise Columns' checked and when I press 'ok ' it optimise the columns.
Background:
On module pool screen I have two ALV GRID (cl_gui_alv_grid) displayed by spitting the screen using splitter control (cl_gui_easy_splitter_container) .
09-24-2008 5:33 PM
Hi Pawan,
Try calling the REFRESH_TABLE_DISPLAY method after initially displaying the ALV. This should get around your issue.
Regards,
Darren
09-24-2008 5:33 PM
Hi Pawan,
Try calling the REFRESH_TABLE_DISPLAY method after initially displaying the ALV. This should get around your issue.
Regards,
Darren
09-24-2008 6:05 PM
The problem is you use wrong atribute
try this: gs_layout-CWIDTH_OPT = 'X'.
09-25-2008 8:50 AM
Filip, I mentioned the wrong fieldname here (copied from fieldcat instead of layout), it was actually cwidth_opt.
This particular ALV grid was getting data at runtime based on user interaction. After assigning the data I called method refresh_table_display and data is refreshed on screen, however the column were not optimised.
Before refresh_table_display I called the method set_frontend_layout and this solved the problem.
Thanks for your time!!