Use user-defined image in ALV tree instead of ICON
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.
call method g_alv_tree->add_node
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
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!
Edited by: Nova Soft on Oct 17, 2008 12:43 PM