08-22-2007 9:58 AM
08-22-2007 10:01 AM
Use the COLOR or INVERSE COLOR addition with the WRITE statement.
WRITE <Field> COLOR col_heading.
Please mark points if the solution was useful.
Regards,
Manoj
08-22-2007 10:03 AM
Hi,
You can use like below
FORMAT COLOR COL_POSITIVE INTENSIFIED ON. " green color
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON. " red
FORMAT COLOR COL_TOTAL INTENSIFIED ON. " yellow
Omit INTENSIFIED ON to get light color
08-22-2007 10:03 AM
Hi
use this logic
loop at itab.
rec = sy-tabix % 6. "first record 1,second rec 2 etc.......
write:/ itab-fld1 color rec.
endloop.
reward points to all helpful answers
kiran.M
08-22-2007 10:06 AM
Hi,
Use format command for that.
FORMAT [COLOR {{{color [ON]}|OFF}|{= col}}]
[INTENSIFIED [{ON|OFF}|{= flag}]]
[INVERSE [{ON|OFF}|{= flag}]]
[HOTSPOT [{ON|OFF}|{= flag}]]
[INPUT [{ON|OFF}|{= flag}]]
[FRAMES [{ON|OFF}|{= flag}]]
[RESET].
... COLOR {{{color [ON]}|OFF}|{= col}}
Effect
This addition sets the color of the output. If the attribute INVERSE is set to OFF (default setting), this sets the background color of the output. If the attribute INVERSE is set to ON, this sets the foreground color of the output.
You can specify the color either statically using color , or dynamically using col. For color, use the syntax directly from the following table. You do not need to specify ON. For col, a data object of type i is expected, which containsone of the values from the following table. If col contains a different value, this is handled like the value 0.
Syntax of color value in col color
0 GUI-specific
{ 1 | COL_HEADING } 1 Gray-blue
{ 2 | COL_NORMAL } 2 Light gray
{ 3 | COL_TOTAL } 3 Yellow
{ 4 | COL_KEY } 4 Blue-green
{ 5 | COL_POSITIVE } 5 Green
{ 6 | COL_NEGATIVE } 6 Red
{ 7 | COL_GROUP } 7 Violet
The OFF has the same effect as COL_BACKGROUND or the value 0 in col and is the default setting. In this setting, the color of the background corresponds to a line of the background color of the GUI window.
The COLOR addition does not affect lines that are made of line elements, or on windows that are ready for input.
Rewards points if it useful.
08-22-2007 10:09 AM
Hi
use this logic
loop at itab.
rec = sy-tabix % 6. "first record 1,second rec 2 etc.......
write:/ itab-fld1 color rec.
endloop.
reward points to all helpful answers
kiran.M
08-22-2007 10:19 AM
Hi
I think it is not possible to get the records in different colors ,we can get same color for all the records because
FORMAT COLOR n.
here n should be constant like n = 1--to--7or COL_BACKGROUND COL_HEADING etc
we can do in one way that for every loop iteration n should change that we can do with the variable taking at n,but FORMAT COLOR cant accept the direct variable to get the different colors for the different records beacuse it is constant there.
Regards
sandhya