‎2006 Mar 29 11:48 AM
Hi,
I have some questions about SALV report:
1. How I can to color key columns without to define
DB table with keys(like in demo examples),and
without that color rows make color line on key colomns if I just add color to key column.
2. I am using set_top_of_list method of cl_salv_table
to create header.
But I can't find how to create two types of header
like I did using REUSE_ALV_COMMENTARY_WRITE.
Thank you very much
Irena
‎2006 Mar 29 12:16 PM
Irena,
Regarding coloring the columns, you need to include a color table as a part of the DATA table.
types: begin of data_table.
include type MAIN_DATA.
types: t_color type lvc_t_scol,
end of DATA_TABLE.
Once this is done, you need to color each of the cells of each of the row differently, if that is what you are looking for.
ls_color-fname = 'COLUMN1'.
ls_color-color-col = col_positive.
ls_color-color-int = 0.
ls_color-color-inv = 0.
append ls_color to t_color.
data_table-t_color = lt_color.
That means there will be multiple rows in the t_color table for each row in the DATA table.
Hope this will fix the issue for you.
As you are dealing with SALV classes, we will not have a FIELD CATALOG at all.
Regards,
Ravi
Note : Please mark the helpful answers.
‎2006 Mar 29 12:10 PM
Hi irena,
1. if the fields are not key fields in the database table,
then we have to make use
of the field-catalogue,
2. in field-catalogue,
there is one field
KEY
make that 'X'.
regards,
amit m.
‎2006 Mar 29 12:16 PM
Irena,
Regarding coloring the columns, you need to include a color table as a part of the DATA table.
types: begin of data_table.
include type MAIN_DATA.
types: t_color type lvc_t_scol,
end of DATA_TABLE.
Once this is done, you need to color each of the cells of each of the row differently, if that is what you are looking for.
ls_color-fname = 'COLUMN1'.
ls_color-color-col = col_positive.
ls_color-color-int = 0.
ls_color-color-inv = 0.
append ls_color to t_color.
data_table-t_color = lt_color.
That means there will be multiple rows in the t_color table for each row in the DATA table.
Hope this will fix the issue for you.
As you are dealing with SALV classes, we will not have a FIELD CATALOG at all.
Regards,
Ravi
Note : Please mark the helpful answers.
‎2006 Mar 29 12:16 PM
Hi,
try setting this KEY = 'X' for the field which you want to show the key color in your fieldcatalog.
<b>fieldcatalog-key = 'X'.</b>
Regards
Vijay
‎2006 Mar 29 2:07 PM
Thank you very much, your answer,Ravi, solves my problem.
Just I hoped that I'l use some property of key fields.
What about question 2?