‎2006 Nov 15 6:00 AM
hi experts,
I have created one report in that there is 8 columns.Out of this eight column 3 columns are related to each other.so i want to display these three column in different color.How to do this.
regards,
Ashok.
‎2006 Nov 15 6:08 AM
Hi,
While Printing those fields, you can set color using the ABAP command format like the following. for more colours list you can refer to SAP online help documentation.
... COLOR n [ON] or ...COLOR OFF
Effect
Color of line background. n can have the following values:
OFF
or COL_BACKGROUND
Background (GUI-specific)
1
or COL_HEADING
Headers (grayish blue)
2
or COL_NORMAL
List body (bright gray)
3
or COL_TOTAL
Totals (yellow)
4
or COL_KEY
Key columns (bluish green)
5
or COL_POSITIVE
Positive threshold value (green)
6
or COL_NEGATIVE
Negative threshold value (red)
7
or COL_GROUP
Control levels (violet)
‎2006 Nov 15 6:02 AM
‎2006 Nov 15 6:02 AM
write: itab-filed1 color 3,itab-filed2 color 4,itab-filed3-color5.
‎2006 Nov 15 6:03 AM
R u using alv to displa the output?
Have a lok at below links It ll help you.
http://www.sap-basis-abap.com/abap/color-a-column-value-in-alv-report.htm
Best Regards,
Vibha
*Please mark all the helpful answers
‎2006 Nov 15 6:08 AM
Hi,
While Printing those fields, you can set color using the ABAP command format like the following. for more colours list you can refer to SAP online help documentation.
... COLOR n [ON] or ...COLOR OFF
Effect
Color of line background. n can have the following values:
OFF
or COL_BACKGROUND
Background (GUI-specific)
1
or COL_HEADING
Headers (grayish blue)
2
or COL_NORMAL
List body (bright gray)
3
or COL_TOTAL
Totals (yellow)
4
or COL_KEY
Key columns (bluish green)
5
or COL_POSITIVE
Positive threshold value (green)
6
or COL_NEGATIVE
Negative threshold value (red)
7
or COL_GROUP
Control levels (violet)
‎2006 Nov 15 6:12 AM
Hi Ashok
It's simple.
In your write statement mention color for the three fields.
Ex.
WRITE 😕 FIELD1, FELD2, FIELD3 COLOR 1, F4, F5, F6 COLOR 1, F7, F8, F9 COLOR 1.
(assuming 3,6,9 are related).
Regards
Surya.
‎2006 Nov 15 6:33 AM
hi Ashok,
do as follows, it will solve your problem.
loop at itab.
write:/ itab-field1 color 3,itab-field2 color 4, itab-field3,itab-field4 color 4......
endloop.
so it will fill the color for the fields 1,2,4 but not for 3.
thanks,
Murali
‎2006 Nov 15 6:33 AM
Hi,
in your case you can go for ALV list, and make those three columns as key fields, then they appear in different colour. and also alv coding is simple and faster.
you need not to do any formatting.
Regards
Vijay