How can I use color value variable? For example, this works for me:
write:/10 'test' COLOR COL_HEADING.
I thoght that colours are integers so I tried:
data:
gv_mycolor type I.
gv_mycolor = 5.
write:/10 'test' COLOR gv_mycolor.
the second code gives me an error: "Color gv_mycolor is not expected; only 1 to 7 or the relevant color IDs are allowed. Statement
FORMAT COLOR = gv_mycolor.
works for me, I have problem just with write statement.
Can anybody help?
A color variable is a visual variable that defines the color of a symbol based on a numeric data value returned from a field or expression. If an expression is used, the color can be defined from a color ramp with a set of pre-defined color ranges.
WRITE - ABAP Keyword Documentation. [QUICKINFO info]. This statement formats the content of the data object dobj and writes it to the current page of the current list in the list buffer. This is either a screen list in the list buffer or a spool list.
DATA colour TYPE i VALUE 2.
WRITE:/10 'test' COLOR = colour .
You MUST use an equal sign, and that's all there is to it... ABAP and it's funny statements :P
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With