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: 

How to make particular field value to red in Table control of module pool??

hiriyappa_myageri
Participant
0 Kudos

Hi Guys ,

I have a client requirement. They want particular field  value should be red  in table control of a module pool program .

We have a SCREEN Structure using this we can modify particular field value to blue, but customer

Particularly asking for RED .

and I have one more query.

WHAT is the use of  FIELD ‘”COLOR”  in “SCREEN” STRUCTURE?

Please help me out .

10 REPLIES 10

Aashish28
Contributor
0 Kudos

Hiii,

        if that screen field is required or you had apply some checks or foreign check on that field(eg. if you put wrong material which is not present in mara than ) you can see by default red color will appear

but you can not set it, In table control only screen-INTENSIFIED = 1. (Blue color ) is option , screen-color will not set any color if you want colorful than use editable alv instead of table control you can easily make it colorful

himanshu_gupta13
Employee
Employee
0 Kudos

Hi Myageri,

It can not be possible to assign font color in table control field but their can do this only with the help of OOPs ALV i.e. in module pool you have to put custom control and then using the cl_gui_custom_container and cl_gui_alv_grid classes you can show the same with wide verities of functions like edit mode, font colour setting, etc.

here while assigning layout using the structure LVC_S_LAYO here you can assign the colour.

Many Thanks / Himanshu Gupta

former_member184569
Active Contributor
0 Kudos

The Screen structure does not have an attribute called color.

The screen structure comprises of the following fields.

Component

Length

Type

Meaning

Attribute

surname

132

C

Name of the screen field

Name

group1

3

C

Modification group 1

Group 1

group2

3

C

Modification group 2

Group2

group3

3

C

Modification group 3

Group3

group4

3

C

Modification group 4

Group4

required

1

C

Field input is mandatory

Mandatory field

input

1

C

Field is ready for input

Entry

output

1

C

Field is for display only

The output is as follows:

intensified

1

C

Field is highlighted

Highlighted

invisible

1

C

Field is suppressed

Invisible

length

1

X

Field length

VisLg

active

1

C

Field is active

Input/Output/Invisible

display_3d

1

C

Three-dimensional box

Two-dimensional

value_help

1

C

Input help button display

Input helps

request

1

C

Input exists

-

If you just need a change in color to distinguish a column, its best to use the attribute 'intensified' of the corresponding screen element of table control.

LOOP AT <TC>

       module Color_column.

ENDLOOP.

In that color_color module, for that particular field, set screen attribute intensified to 1.

module color_column

   loop at screen.

    if <tc-field name> = 'value'.

      SCREEN-INTENSIFIED = '1'.

      modify screen.

    else.

      SCREEN-INTENSIFIED = '0'.

      modify screen.

endmodule.

venkateswaran_k
Active Contributor
0 Kudos

Hi

Go to screen layout

In the table control, double click on the col where you want in red colour.

you will get one popup for specifying attributes.

go to Display Tab of Attributes seciton

check the check box brightness.

This will give you red colour

Please udpate with your feedback

Regards,

Venkat

0 Kudos

Hi Venkateswaran,

Very thankyou to know that it shows red in table control but on using this attribute on text it shows blue.

Many Thanks / Himanshu Gupta

0 Kudos

Hi Venkat,

I followed steps mentioned, For me its Showing the Values Present in that column as BLUE .

but i need particularly one value as RED.

0 Kudos

Hiii hiriyappa,

                      When you select check box brightness than values present in that column/field will always display as blue if is in read only mode but when it is in editable mode than value will be shown in red color.

hiriyappa_myageri
Participant
0 Kudos

Hi All ,

Thank u for All Valuable Feed backs.

0 Kudos

How you change the color of Input/output box in module can u share the coding ? but i also want font size ?

kindly recommend solution.thank you.

0 Kudos

aya12

Best to post your own question rather than responding to one older than ten years...