cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the color of a single field in a row of a table

Former Member
0 Kudos

Is it possible to change the color of text of a single field within a single column. If field 'C' in a row is negative number change the text color to red. Is this possible?

Accepted Solutions (0)

Answers (3)

Answers (3)

ChandraMahajan
Active Contributor
0 Kudos

Hi,

I guess you can use UI TableSingleMarkableCell .

refer http://help.sap.com/saphelp_em70/helpdata/en/a5/b8fa41c915da6fe10000000a1550b0/content.htm and also see standard application WDR_TEST_TABLE.

Thanks,

Chandra

Former Member
0 Kudos

Hi Champion,

Please Do search before posting.. you get lots of threads here...

Please go through this..

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/707fb792-c181-2d10-61bd-ce15d58b5...

Former Member
0 Kudos

I know that I can change the background color of a whole column using the Cell Design property of a TableColumn. What I am asking if you can change the background color or text color of just one entry in a column. For example the entry marked with a X would be either red background or red text and all other fields ( O )would be green

-


So there is 5 fields and 4 row entries. I want the 4th field of the 3rd row to be either red background or text.

O O O O O

O O O O O

O O O X O

O O O O O

-


Is this possible. I looked into the links posted, but they seemed to be setting the background color of the entire row.

Former Member
0 Kudos

Hi Champion,

Instead of one attribute create two attributes( you created alredy ) and bind 4 fields( Except 1 which you want color ) to one attribute. and bind remaining field with other attribute.

Now based on condition.. pass abap_tru or false to set color..

For ex : INV1 and INV2 are my attribute of type Boolean here.

ls_segment1-INV1 = ABAP_FALSE.

ls_segment1-INV2 = ABAP_TRUE.

ls_segment1-cell_design = desnval1. // cell_design is attribute for color.

Cheers,

Kris.

Former Member
0 Kudos

Hi

I suggest you check the below SDN document for the solution.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/707fb792-c181-2d10-61bd-ce15d58b5...

Regards

Lorraine