Application Development 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: 

background color for text

Former Member
0 Kudos

Hi all,

here in my list output i'm getting background color for text ,but in my program i didn't find the relavent code for this color output.can anyone suggest me what are the ways to get the background color for text in output?

<REMOVED BY MODERATOR>

thank u

sunny.

Edited by: Alvaro Tejada Galindo on Apr 15, 2008 4:40 PM

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Sunny,

The options COLOR, INTENSIFIED, and INVERSE of the FORMAT statement influence the colors of the output list.

To set colors in the program, use the following syntax:

FORMAT COLOR <n> [ON] INTENSIFIED [ON|OFF] INVERSE [ON|OFF].

To set colors at runtime, use the following syntax:

FORMAT COLOR = <c> INTENSIFIED = <int> INVERSE = <inv>.

These formatting options do not apply to horizontal lines created by ULINE. They have the following functions:

COLOR sets the color of the line background. If, in addition, INVERSE ON is set, the system changes the foreground color instead of the background color.

For <n> you can set either a color number or a color specification. Instead of color number 0, however, you must use OFF. If you set the color numbers at runtime, all values of <c> that are less than zero or greater than seven, lead to undefined results.

The default setting is COLOR OFF.

INTENSIFIED determines the color palette for the line background.

INVERSE affects the foreground color.

For another demonstration of colors in lists, call the executable program SHOWCOLO in any system.

Reward points if useful.

4 REPLIES 4

Former Member
0 Kudos

Goto transaction LIBS ..

and then double click on : Demo: All Colors

check which color UR getting in the O/P ..

Format color 0 intensified/inverse ...

Former Member
0 Kudos

Hi Sunny,

You can use

FORMAT COLOR number.

numbers are from 0 to 7.

where you can get different types of colors.

FORMAT INTENSIFIED ON/OFF

FORMAT INVERSE ON/OFF

Where you can change the foreground and background colors as well.

Cheers,

Swamy Kunche

former_member583013
Active Contributor
0 Kudos

Run this program -:) It's not mine...Take it from the web.


DATA I TYPE I VALUE 0.
DATA COL(15) TYPE C.

WRITE:/9 'INTENSIFIED ON',27 'INTENSIFIED OFF',48 'INVERSE'.

SKIP 2.

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.

Greetings,

Blag.

Former Member
0 Kudos

Hi Sunny,

The options COLOR, INTENSIFIED, and INVERSE of the FORMAT statement influence the colors of the output list.

To set colors in the program, use the following syntax:

FORMAT COLOR <n> [ON] INTENSIFIED [ON|OFF] INVERSE [ON|OFF].

To set colors at runtime, use the following syntax:

FORMAT COLOR = <c> INTENSIFIED = <int> INVERSE = <inv>.

These formatting options do not apply to horizontal lines created by ULINE. They have the following functions:

COLOR sets the color of the line background. If, in addition, INVERSE ON is set, the system changes the foreground color instead of the background color.

For <n> you can set either a color number or a color specification. Instead of color number 0, however, you must use OFF. If you set the color numbers at runtime, all values of <c> that are less than zero or greater than seven, lead to undefined results.

The default setting is COLOR OFF.

INTENSIFIED determines the color palette for the line background.

INVERSE affects the foreground color.

For another demonstration of colors in lists, call the executable program SHOWCOLO in any system.

Reward points if useful.