on 10-21-2008 9:12 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you have to use tableview iterators, search this forum.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.