2008 Jul 08 3:39 AM
hi,
How to create color in classical & interactive reports for every single character.(i need a full coding.)
2008 Jul 08 3:53 AM
Hi Jey,
WELCOME TO SDN!!!
Please check this code.
DATA lt_mara TYPE mara OCCURS 0 WITH HEADER LINE.
SELECT * FROM mara INTO TABLE lt_mara.
LOOP AT lt_mara.
WRITE:/2 lt_mara-matnr COLOR 3,
30 lt_mara-matkl COLOR 1,
40 lt_mara-mtart COLOR 5.
ENDLOOP.
Interactive Report
DATA: lt_mara TYPE mara OCCURS 0 WITH HEADER LINE,
lt_mard TYPE mard OCCURS 0 WITH HEADER LINE.
SELECT * FROM mara INTO TABLE lt_mara.
LOOP AT lt_mara.
WRITE:/2 lt_mara-matnr COLOR 3,
30 lt_mara-matkl COLOR 1,
40 lt_mara-mtart COLOR 5.
HIDE lt_mara-matnr.
ENDLOOP.
AT LINE-SELECTION.
SELECT *
FROM mard
INTO TABLE lt_mard
WHERE matnr = lt_mara-matnr.
LOOP AT lt_mard.
WRITE:/ lt_mard-matnr COLOR 4,
lt_mard-werks COLOR 6,
lt_mard-lgort COLOR 7.
ENDLOOP..
Best regards,
raam
2008 Jul 08 3:54 AM
Hi,
Syntax:
WRITE: / P_VBELN COLOR 5,
P_VKORG COLOR 5.
Regards,
Ruthra
2008 Jul 08 3:55 AM
Hi,
I'm not sure your meanings, so i just give you some refer:
data: col(10) type c value 'ABCD'.
write: col color 6 INVERSE on.
Hope it helps
Bob
2008 Jul 08 4:04 AM
Hi,
if you want to display the values with color just see given below
in write statement
write:/ itab-fname COLOR 1,
itab-fname COLOR 2,
itab-fname COLOR 3.
here we can have upto 7 colors. you can use which ever you want.
Regards.
Sriarm.
2008 Jul 08 4:50 AM
hi jey,
try this
v_len = strlen( mara-matnr ).
v_color = 1.
v_offset = 0.
do v_len times.
if v_color >7.
v_color = 1.
endif.
v_char = mara-matnr+v_offset(1).
write: v_char color v_color.
add 1 to v_offset.
enddo.
regards,
Peter