Hi,
I´m using "cl_alv_table_create=>create_dynamic_table" to create a dynamic table for ALV Grid.
But...I need to use colors in ALV, then I need to declare a field type LVC_S_SCOL in dynamic table from "cl_alv_table_create=>create_dynamic_table".
How can I declare this in fieldcat?
The code:
Creating dynamic table
DATA: table_agrup TYPE REF TO data,
line_agrup TYPE REF TO data.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = t_fieldcat
IMPORTING
ep_table = table_agrup
EXCEPTIONS
generate_subpool_dir_full = 1
OTHERS = 2.
ASSIGN table_agrup->* TO .
........
Printing ALV
CALL METHOD obj_grid->set_table_for_first_display
EXPORTING
is_variant = w_variant
i_save = 'A'
is_layout = w_layout
CHANGING
it_outtab =
it_fieldcatalog = t_fieldcat
it_sort = t_sort
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
Thanks.
As far as I know, thse are the things you will need to do:
1. In your structure w_layout, there should be field called INFO_FIELDNAME which should be set to 'COLOR'.
2. In the the final output internal table that you are outputting using the field catalog add an additional field called COLOR defined as char 3.
3. Set the value of and this color parameter to be 'C20' ex: t_final-color = 'C20'.
Note: C20 is only an example color, you may want to change the number based on what color you want.
Try this, it worked for me for multiple list ALV.. it should work for the grid too..
As far as I know, thse are the things you will need to do:
1. In your structure w_layout, there should be field called INFO_FIELDNAME which should be set to 'COLOR'.
2. In the the final output internal table that you are outputting using the field catalog add an additional field called COLOR defined as char 3.
3. Set the value of and this color parameter to be 'C20' ex: t_final-color = 'C20'.
Note: C20 is only an example color, you may want to change the number based on what color you want.
Try this, it worked for me for multiple list ALV.. it should work for the grid too..
Add a comment