09-25-2014 12:24 PM
Hi experts,
I have an ALV, created with class CL_GUI_ALV_GRID.
In this ALV, I have a few input fields.
Now I want to "auto-resive" the cell width after maintaining data.
For example - I have column material number.
When I enter a material here, next colum "Material text" will be filled (using "Data_changed").
Now this column material text should be auto resized.
How to do that? I have tried to set cwidth_opt to X for the layout, but it's not working.
Any ideas?
Thanks
Michael
09-25-2014 12:40 PM
Hello Michael,
In fieldcat: --> ls_fieldcat-col_opt = abap_true
and:
call method g_alv->get_frontend_fieldcatalog
importing
et_fieldcatalog = fieldcat.
call method g_alv-->set_frontend_fieldcatalog
exporting
it_fieldcatalog = fieldcat.
call method g_alv->refresh_table_display
EXPORTING
is_stable = stbl
i_soft_refresh = space.
I hope you help.
09-25-2014 12:40 PM
Hello Michael,
In fieldcat: --> ls_fieldcat-col_opt = abap_true
and:
call method g_alv->get_frontend_fieldcatalog
importing
et_fieldcatalog = fieldcat.
call method g_alv-->set_frontend_fieldcatalog
exporting
it_fieldcatalog = fieldcat.
call method g_alv->refresh_table_display
EXPORTING
is_stable = stbl
i_soft_refresh = space.
I hope you help.
09-25-2014 12:53 PM
Hi,
already tested with col_opt = 'X'.
This does not work.
But I found the solution - col_opt must be 'A'...sometimes it could be so easy 😉
Thanks
Michael