05-06-2011 10:55 AM
Dear all,
I am facing a strange problem with ALV grid.
I am using the method set_table_for_first_display of class cl_gui_alv_grid.
For Layout I am using FM 'LVC_FIELDCATALOG_MERGE'.
In the output all the fields are displayed in blue colour. I am not modifying the field catalogue.
One more strange thing I observed is if I dont pass variant to the method set_table_for_first_display, the output is fine (all the columns are in white colour).
Now I want all the fields in white colour when i pass variant.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'ZC9_TWS_DEV_OUTPUT'
i_bypassing_buffer = 'X'
CHANGING
ct_fieldcat = gs_fieldcat
EXCEPTIONS
inconsistent_interface = 0
program_error = 0
OTHERS = 0.
CALL METHOD go_grid_1->set_table_for_first_display
EXPORTING
is_layout = gs_layout
is_variant = gv_variant
i_save = 'A'
i_default = 'X'
CHANGING
it_fieldcatalog = gs_fieldcat
it_outtab = gt_output.
Could you please help me
Thanks in advance
Edited by: Aravind Kanaparthi on May 6, 2011 11:58 AM
05-06-2011 12:47 PM
Is possible that you are passing fields property in fieldcatalog, setting "KEY" = true?
05-06-2011 1:24 PM
Hi Spantaleoni ,
Thanks for your reply.
As you said I was setting the key field and then removed it. But that field layout is saved and every time that layout was being called.So, All the columns are in blue colour even the key field is space
I have deleted the default layout. Now its fine.
Thanks once again
05-06-2011 1:25 PM