Format the text with colors in the Output List
To format the text, color field in the WRITE statement can be used.The Color value decides the color type for the text.
Below is the Color value for the text.
Code
DATA i TYPE i VALUE 0.
DATA col(15) TYPE c.
WHILE i < 8.
CASE i.
WHEN 0. col = 'COL_BACKGROUND '.
WHEN 1. col = 'COL_HEADING '.
WHEN 2. col = 'COL_NORMAL '.
WHEN 3. col = 'COL_TOTAL '.
WHEN 4. col = 'COL_KEY '.
WHEN 5. col = 'COL_POSITIVE '.
WHEN 6. col = 'COL_NEGATIVE '.
WHEN 7. col = 'COL_GROUP '.
ENDCASE.
FORMAT INTENSIFIED COLOR = i.
WRITE: /(4) i, AT 7 sy-vline,
col, sy-vline,
col INTENSIFIED OFF, sy-vline,
col INVERSE.
i = i + 1.
ENDWHILE.
Output
For more Tutorials, visit ABAP Tutorials, Tips & Tricks and Certification Questions
No comments:
Post a Comment