01-11-2007 4:33 AM
Hi ,
Suppose I have this format
0
0
1
0
2
0
0
then, how can I display 1&2 in different color than 0's? please help....
01-11-2007 4:43 AM
if it is a simple report then
loop at itab.
if itab-value = 0.
format color 3.
write : itab-value.
format color off.
else.
format color 5.
write : itab-value.
format color off.
endif.
endloop.
regards
shiba dutta
01-11-2007 4:38 AM
Hi ,
You want to implement this in ALV or reports.
If it is reports use the command FORMAT COLOR n .
Regards
Arun
01-11-2007 4:41 AM
Hi,
Check using if condition,whether the value is zero.If so,display it with one color.Otherwise,use someother color.
Check this link.
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/format.htm
01-11-2007 4:42 AM
in write statement itself u can specify the color u wants to have to that output.
eg.
write : var color 3.
01-11-2007 4:43 AM
if it is a simple report then
loop at itab.
if itab-value = 0.
format color 3.
write : itab-value.
format color off.
else.
format color 5.
write : itab-value.
format color off.
endif.
endloop.
regards
shiba dutta
01-11-2007 4:44 AM
01-11-2007 4:44 AM
Hi,
If it is ALV display u can do this ....
Check the option in the layout
<b> info_fieldname</b>
value set: SPACE, internal output table field name
whole list record can be colored individually using a color code
in a column of the internal output table for the record. Assign the
name of the field containing the color code to this parameter.
The internal output table field must be of type CHAR(3).
The code must have the following syntax: 'Cxy':
Note: the color of the key columns is not affected.
In ALV list output each row can be colored by using the field INFO_FIELDNAME in the fieldcatlog . To do this in the output internal table (which is passed to the ALV display ) one must maintain extra field like rowcol.
To color a row , rowcol field must contain the value like 'Cxy':
C = color (all codes must start with 'C')
x = color number ('1'-'9')
y = bold ('0' = off, '1' = on).
After this the field INFO_FIELDNAME must be assigned with the name of the filed which contains the color code. ( info_fieldname = ROWCOL ).
-
santhosh