cancel
Showing results for 
Search instead for 
Did you mean: 

Set a colour to a row in a table view which does not use an iterator

Former Member
0 Kudos

Hi ,

I have an application , which displays data using a table view.

How can i set colour to a row based on the value of one of its coloums.

The table view does not use an itertator.

Thanks

Arun

Accepted Solutions (0)

Answers (1)

Answers (1)

athavanraja
Active Contributor
0 Kudos

you can use the following code in the ONMANIPULATION event to modify the color of the row. but be aware that if SAP changes rendering ot htmlb:tableview it may not work.

this code sample set the bgcolor of row 2 to blue.

DATA: httpbody TYPE string .

CALL METHOD response->if_http_entity~get_cdata

RECEIVING

data = httpbody.

REPLACE ALL OCCURRENCES OF '<tr rr="2"' IN httpbody WITH '<tr rr="2" bgcolor="blue"' IGNORING CASE .

CALL METHOD response->if_http_entity~set_cdata

EXPORTING

data = httpbody.

Regards

Raja