Skip to Content
avatar image
Former Member

SAP Icons In TableView

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Oct 21, 2008 at 09:34 AM

    you have to use tableview iterators, search this forum.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 21, 2008 at 03:14 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 22, 2008 at 08:08 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 23, 2008 at 08:43 AM

    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

    Add comment
    10|10000 characters needed characters exceeded