cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Icons In TableView

Former Member
0 Kudos

Hi,

i've got an internal table for tableview, that have got an icon field. i fill icon field with sap icon id's ('@5C@' , etc.) but it doesn't seem as a icon , it seems the value of icon field as '@5C@' and etc.

How can i show the sap icon in icon field in table view?

Can somebody help me pls?

Thanks.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Tabs:

[Interfaces|http://screencast.com/t/WUouvugs]

[RENDER_CELL_START|http://screencast.com/t/Oee6lI3Yy]

[Page attributes|http://screencast.com/t/ZJxmNUm7slE]

[onCreate|http://screencast.com/t/DA81wqVU]

[Layout|http://screencast.com/t/bv7uKo2zGAi]

Edited by: Lyzo Vladimir on Oct 23, 2008 10:49 AM

Former Member
0 Kudos

hello,

If you are using the MVC programming model, you can use iterators for this.

Add a new column BUTDEL in method get_column_definitions:

field-symbols: <def> like line of p_column_definitions.

append initial line to p_column_definitions

assigning <def>.

<def>-columnname = 'BUTDEL'.

Declare a variable in method render_cell_start:

DATA: lv_icon_delete_row TYPE string.

Assign a value to it:

lv_icon_delete_row = cl_bsp_mimes=>sap_icon( id = 'ICON_DELETE_ROW' ).

Next replace the cell value:

CASE p_column_key.

WHEN 'BUTDEL'.

p_replacement_bee = cl_htmlb_image=>factory(

id = p_cell_id

src = lv_icon_delete_row

).

ENDCASE.

It should work like this. If not, I forgot something and you have to search for how to use iterators.

br,

stepan

ps. you dont have to store the icon in your internal table. You can display the icon dynamically according to the situation.

Former Member
0 Kudos

Hi Stepan,

First of all thaks for your reply,

i couldn't use the method render_cell_start, because i don't know how and where i can use the this method. Can you show how using this method if it won't be problem for you pls?

Thanks again.

Former Member
0 Kudos

Hi,

you have to add the interface IF_HTMLB_TABLEVIEW_ITERATOR to your model class

former_member184111
Active Contributor
0 Kudos

Hi Rustem,

If there are only a few icons that you are using in your application then you can import them in your BSP Application in MIME and directly use thier name instead of the icon Ids..

Hope it helps.

Regards,

Anubhav.

athavanraja
Active Contributor
0 Kudos

you have to use tableview iterators, search this forum.