2007 Sep 17 4:25 AM
how to display each coloum in different colors in normal classical report ( not in alv classical report ).
2007 Sep 17 4:29 AM
You can use the COLOR addtion to each write statement:
WRITE v_var COLOR col_head.
for more info,please read the documentation for the statement 'WRITE' and check the formatting options.
2007 Sep 17 4:31 AM
check this sample code.
tables : mara.
data : begin of itab occurs 0,
matnr like mara-matnr,
mtart like mara-mtart,
matkl like mara-matkl,
end of itab.
select matnr mtart matkl into table itab from mara up to 10 rows.
loop at itab.
format color 2.
write : / itab-matnr.
format color 3.
write : itab-mtart.
format color 4.
write : itab-matkl.
endloop.
regards
shiba dutta
2007 Sep 17 4:41 AM
hai,
hope you require this in write statement. please check this code .
&----
*& Report ZEX03
*&Program For Getting Flight Booking Details Of A Person.
*&Programmer Name : Muhammed Nishad J
*&Coded on : 17.09.2007
*&Package : ZTEST
&----
REPORT zex03 LINE-SIZE 66 LINE-COUNT 34(2) .
--
--
--Structure For Holding Booking Details--
TABLES:
sbook.
DATA:
BEGIN OF st_sbook,
carrid LIKE sbook-carrid,
connid LIKE sbook-connid,
fldate LIKE sbook-fldate,
customid LIKE sbook-customid,
forcuram LIKE sbook-forcuram,
forcurkey LIKE sbook-forcurkey,
END OF st_sbook,
wa_sbook LIKE st_sbook.
-End of Structure Declaration--
--
PARAMETERS :
carrid TYPE sbook-carrid,
connid TYPE sbook-connid,
fldate TYPE sbook-fldate.
--
INITIALIZATION.
carrid = 'AA'.
connid = '0017'.
--
--
AT SELECTION-SCREEN OUTPUT.
IF fldate IS INITIAL.
MESSAGE ' Enter Fldate' TYPE 'S'.
ENDIF.
--
--
START-OF-SELECTION.
-----Printing the details--
--
WRITE:/.
skip.
ULINE AT 1(66).
WRITE: sy-uline.
WRITE: 1 sy-vline.
WRITE:2(10) text-001 COLOR 6, 11 '|'.
WRITE:12(10) text-002 ,22 '|' .
WRITE:23(10) text-003, 33 '|'.
WRITE:34(10) text-004, 44 '|'.
WRITE:45(10) text-005, 55 '|'.
WRITE:56(10) text-006 ,66 '|'.
WRITE: sy-uline.
----End of Code For Displaying Header Details--
----Code For Selecting Booking Details--
SELECT carrid connid fldate customid forcuram forcurkey
INTO wa_sbook FROM sbook
WHERE carrid = carrid AND
connid = connid." AND
"fldate = fldate.
-----Display currency to INR--
wa_sbook-forcurkey = 'INR'.
----End of Display Currency To INR--
----Code For Displaying Item Details--
WRITE:/1 sy-vline , 2(10) wa_sbook-carrid COLOR 6.
WRITE:11 sy-vline, 12(10) wa_sbook-connid .
WRITE:22 sy-vline, 23(10) wa_sbook-fldate YYMMDD.
WRITE:33 sy-vline, 34(10) wa_sbook-customid.
WRITE:44 sy-vline, 45(10) wa_sbook-forcuram.
WRITE:55 sy-vline, 56(10) wa_sbook-forcurkey ,66 sy-vline.
WRITE: sy-uline.
----End of Code For Displaying Item Details--
ENDSELECT.
--
END-OF-SELECTION.
--
TOP-OF-PAGE.
WRITE:'This An Example For Demonstrating Event In ABAP Reporting'.
END-OF-PAGE.
WRITE:'Page No: ', sy-pagno .
write:/'Programmer Name : Muhammed Nishad J'.
--
2007 Sep 17 4:42 AM
Hi..
in ABAP you can display 7 colors which are numbered from 1 TO 7.
Example:
Write:/ wa-ebeln COLOR 1,
WA-LIFNR COLOR 2,
WA-AEDAT COLOR 3.
<b>reward if Helpful.</b>