‎2009 Feb 04 6:06 AM
Hi all,
I am about to dispaly a table with the help of a grid. The table may contain a single attribute(column) or multiple. It depends on the selection.
For the first time of display it is wokring fine for both type of (single column and multiple columns) tables.
From second time onwards, the length of the column is being expanded to the length of the grid.
But in case of multiple columns, it is working fine....
Can you please tell me reason and the solution?
Thanking you very much..
Regards,
Balakrishna.N
‎2009 Feb 04 6:13 AM
Hi,
Refresh all your global data if you are re-populating them for each display.
‎2009 Feb 04 6:13 AM
Hi,
Refresh all your global data if you are re-populating them for each display.
‎2009 Feb 04 6:19 AM
Thank you very much for your quick response.
I did not get the meaning of "refresh all you global data". Can you please explain me in detail...
FYI.....
Grid length....20.
Table has one column and lengh is 10 and has one record.
For the first time it display the one record in the grid with the length of 10 chars.
I entered one more record into the grid and at the time refreshing the table onto the grid, it is being displayed with the length of 20 which is equal to full length of grid.
Thanks and Regards,
Balakrishna.N
‎2009 Feb 04 6:26 AM
IF you are using ALV grid, try to give
* declaration
DATA: LAYOUT TYPE slis_layout_alv.
* after fieldcatalog give this stmt.
layout-colwidth_optimize = 'X'. in layout. Dont forget to pass this LAYOUT in FM of grid.!
regards,
Padma
Edited by: Padmashree RamMaghenthar on Feb 4, 2009 11:59 AM
‎2009 Feb 04 6:30 AM
Can you please provide the part of your codes where you are displaying the output.
Regards.
‎2009 Feb 04 6:44 AM
lwa_layout-colwidth_optimize = c_x.
lwa_layout-zebra = c_x.
lv_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = lv_repid
is_layout = lwa_layout
it_fieldcat = li_fieldcat
TABLES
t_outtab = p_fs_final
EXCEPTIONS
program_error = 1
OTHERS = 2.
‎2009 Feb 04 6:29 AM
Hi Balakrishna,
what the FM you are using ?
there is something called colwidth_optimize in your layout, if you set this with 'X', it will optimize your colomn width.
Regards,
Gautham Paspala