cancel
Showing results for 
Search instead for 
Did you mean: 

Refer to MIME image in ALV Table

Former Member
0 Kudos

Hello All,

I know now how to refer to an image in the AVL Table.

But I want to refer to the MIME image.

The filename is not enough?

Anyone an idea?

Thanks & Regards,

Chris Bogers

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

1. Here you have to mention the URL where your mime objects are stored.

data: mime_repository type ref to if_mr_api,
      content type xstring,
      mime_type type string,
      url type string value 'SAP/BC/WebDynpro/SAP/ZTREE/s.bmp'.

mime_repository = cl_mime_repository_api=>get_api( ).
call method mime_repository->get
exporting i_url = url
importing e_content = content  e_mime_type = mime_type.

2. Finally you have the value in an XString which you can bind to the context attribute.

DATA lo_el_context TYPE REF TO if_wd_context_element.
  DATA ls_context TYPE wd_this->element_context.

* get element via lead selection
  lo_el_context = wd_context->get_element( ).


* set single attribute
  lo_el_context->set_attribute(
    name =  `CONTENT`
    value = content ).

Note : CONTENT is my context attribute binded to image UI.

Answers (0)