Skip to Content
author's profile photo Former Member
Former Member

Use user-defined image in ALV tree instead of ICON

Hello Guru,

I want to put my own image in a ALV tree. I find the method 'cl_gui_alv_tree->add_node' seems to allow you use your own bitmap instead of system icon. The sample code I find is using SAP ICON as following.

Data: l_layout_node type lvc_s_layn,

lt_layout_item type lvc_t_layi,

ls_layout_item type lvc_s_layi.

if not p_item_image is initial.

ls_layout_item-fieldname = 'CARRID'.

ls_layout_item-t_image = '@91@'.

append ls_layout_item to lt_layout_item.

endif.

call method g_alv_tree->add_node

exporting

i_relat_node_key = p_relat_key

i_relationship = cl_gui_column_tree=>relat_last_child

i_node_text = p_node_text

is_outtab_line = p_sflight

is_node_layout = l_layout_node

it_item_layout = lt_layout_item

importing

e_new_node_key = p_new_key.

But if you check structure lvc_s_layi in se11. It clearly said that 't_image' also support user-defined bitmap besides ICON.

Could anyone here can tell me how to upload my own bitmap into SAP and use it here.

Thank you in advance!

Trey

Edited by: Nova Soft on Oct 17, 2008 12:43 PM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jan 04, 2011 at 02:51 PM

    Hello.

    Also facing this problem. Did you find an answer?

    regards

    Martin

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.