Showing results for 
Search instead for 
Did you mean: 

Putting colour into TableView cells?

Former Member
0 Kudos

Hi there,

I've developed iViews in Java that put colour into a TableView's cells with code similar to the following:

<hbj:tableView id="da190Table"









          visibleFirstRow="<%=myDA190Bean.getVisibleRow() %>"


          visibleRowCount = "5"





                //loop through table.....





I've gone to "CL_HTMLB_TABLEVIEW" in the class builder and am trying to find a method similar to "setStyleForCell()" seen in the above code. I'm also trying to find a class or interface similar to "TableCellStyle" so that I can get the colours easily. I hope I'm thinking the right way and that ABAP isn't too different to the way Java handles it on the Portal.

So if anyone can let me know how to get colour into TableView cells using BSP's I'll be really stoked...

Thanks for the help


Accepted Solutions (0)

Answers (1)

Answers (1)

Developer Advocate
Developer Advocate
0 Kudos

I am fairly new to the Web World and to BSP's, so I hope I am not leading you wrong. Here is what I have done so far to acomplish the same thing. I have used an HTMLB TableView Iterator and implemented the RENDER_CELL_START method.  This lets you set styles, classes, and even replacement expressions. Brian McKellar has some very helpful WebLogs on Both TableView Iterators and BEEs that got me started down this path.

Active Contributor
0 Kudos

Yes, this is (unfortunately) the only way to go. We do not build a control tree in BSP during rendering. The controls are rendered on the fly. Which means that there are settings that you can only make while rendering. See weblogs on iterators. See also BSP app sbspext_htmlb or bsp_tableview.

For design2002, you can set colors directly via p_style parameter. This was in the days before we got new limited list of colors, etc. For design2003, you can do something such as: p_style = 'celldesign:positive'.


PS: I think I wrote something more about this in a previous append.