Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

problem in reports

Former Member
0 Likes
855

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.

1 ACCEPTED SOLUTION
Read only

former_member283648
Participant
0 Likes
828

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)

7 REPLIES 7
Read only

Former Member
0 Likes
828

Use Alv list

Read only

Former Member
0 Likes
828
write: itab-filed1 color 3,itab-filed2 color 4,itab-filed3-color5.
Read only

Former Member
0 Likes
828

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

Read only

former_member283648
Participant
0 Likes
829

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)

Read only

Former Member
0 Likes
828

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.

Read only

Former Member
0 Likes
828

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

Read only

Former Member
0 Likes
828

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