cancel
Showing results for 
Search instead for 
Did you mean: 

Display image and text in same column of a table

Former Member
0 Kudos

Hi folks,

I need to display such a structure in my table.

Column1                             Column2

Image1 + Text1                    Text12         

|_

     Image2 + Text2               Text22

     |_

          Image3 + Text 3         Text 32

I created a table with a TreeByNestingTableColumn(for column1) and one regular column(for column2).

The problem, that I am facing here is, I can display either Image or Text under Column1, but not both.

I need to display them together with the node icon(which will come from TreeByNestingTableColumn).

Thus, the triangular icon(node icon), image and text should be displayed in the same column.

How can we achieve this?

Thanks,

Swapnil.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If anyone is still interested in this scenario.

We recently found a solution to the above requirement.

We used Caption as TableCellEditor of TreeByNestingTableColumn.

Using Caption, we could display both the image and text along with the node icon.

Regards,

Swapnil.

Former Member
0 Kudos

This is the first link you get on search... So replying on this..

You can get this behavior easily by implementing an Iterator in your table. Infact you can easily make the CN class itself as the iterator my implementing the interface

IF_HTMLB_TABLEVIEW_ITERATOR and assign the same as the iterator in your view.htm.

Then you can use the RENDER_CELL_START method to implement your logic to replace the P_REPLACEMENT_BEE with a BEEHIVE.

Example Components for BEEHIVE impl:

IUBOTREE--- IsuBolTree View -- Check the IMPL class.. it has an attribute iterator.. go to the class to check the render_cell_start

Example Component where context node is reused as an Iterator(check html):

FICACMP_ACC_POS -- FicaAccTotalList View

Hope this helps...

Cheers

A

Answers (2)

Answers (2)

Former Member
0 Kudos

Not too much option.. only a button UI can have both image and text. try to use that as tablecell editor..

Regards,

Sambaran

former_member195270
Active Participant
0 Kudos

You have to do some work around for UI Element Table.

Former Member
0 Kudos

Thanks, Sambaran.

I didn't try the Button UI. I will give it a try and update you.

Thanks,

Swapnil.

former_member195270
Active Participant
0 Kudos

Hi Swapnil,

   It is not possible to display both image + Text in same column.  You can do work around for displaying both image + text.You have to use two column i.e one column for image and one column for text and then change design of the cells in a way that both cells should look like a single cell.

Former Member
0 Kudos

Thanks, Umar.

I tried GroupedColumn(and two columns under it), but the two columns appear distinct.

I saw icon+text in one of the standard applications of SAP CRM on portal.

And so, I am trying to replicate that functionality.

Thanks,

Swapnil.