Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

regarding colored output

Former Member
0 Likes
552

Hi frnds,

I have to create the report ouput as below its a classical report

suppose i have few lines as

1st line : Hi this satya (no color)

2nd line : i am an abaper(color)

3rd line : hi satya (no color)

4th line : hi frnd (color)

.

.

.

.

.

.

.

like this it shuold continue.

so Fst line no color,

2nd line no color.

frnds plz help me...

regards,

satya

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
533

write a perform as ..

perform invert.

form invert.

if v_flag = 'X'.

format color 3.

clear : v_flag .

else.

format color off.

v_flag = 'X'.

endif.

endform.

perform invert.

1st line : Hi this satya (no color)

perform invert.

2nd line : i am an abaper(color)

perform invert.

3rd line : hi satya (no color)

perform invert.

4th line : hi frnd (color)

perform invert.

..

Hi frnds,

I have to create the report ouput as below its a classical report

suppose i have few lines as

1st line : Hi this satya (no color)

2nd line : i am an abaper(color)

3rd line : hi satya (no color)

4th line : hi frnd (color)

.

.

.

.

.

.

.

like this it shuold continue.

so Fst line no color,

2nd line no color.

frnds plz help me...

regards,

satya

3 REPLIES 3
Read only

Former Member
0 Likes
534

write a perform as ..

perform invert.

form invert.

if v_flag = 'X'.

format color 3.

clear : v_flag .

else.

format color off.

v_flag = 'X'.

endif.

endform.

perform invert.

1st line : Hi this satya (no color)

perform invert.

2nd line : i am an abaper(color)

perform invert.

3rd line : hi satya (no color)

perform invert.

4th line : hi frnd (color)

perform invert.

..

Read only

Former Member
0 Likes
533

Hello Satya,

This is done using the FORMAT command

1. ... COLOR {{{color [ON]}|OFF}|{= col}}

2. ... INTENSIFIED [{ON|OFF}|{= flag}]

3. ... INVERSE [{ON|OFF}|{= flag}]

4. ... HOTSPOT [{ON|OFF}|{= flag}]

5. ... INPUT [{ON|OFF}|{= flag}]

6. ... FRAMES [{ON|OFF}|{= flag}]

7. ... RESET

Press F1 on format key word and SAP will open up the documentation for this command.

With the color and intensified option, you can easily achieve this.

HOpe this helps.

cheers,

Sushil Joshi

Read only

Former Member
0 Likes
533

hi

let us suppose u have 25 recors and u wnat one coloured and next not coloured so use the even odd funtionality

like this

loop at i_tab.

w_reminder = MOD sy-index / 2.

if w_reminder = 1 .

write : content (with colour).

else

write content (without colour)

endif.

endloop.

Cheers

Snehi