on 06-01-2010 1:58 PM
Hi all,
I import test.gif to my webdynpro component.
I want show my icon in table and alv table.
Table is ok, but alv table don`t display icon in column.
Here is my code:
lo_column_settings ?= lo_value.
lt_columns = lo_column_settings->get_columns( ).
LOOP AT lt_columns ASSIGNING <fs_col>.
CASE <fs_col>-id.
when 'TEST'.
create object lo_image.
lo_image->SET_SOURCE( 'objtp_mer.gif' ).
<fs_col>-r_column->set_cell_editor( lo_image ).
ENDCASE.
ENDLOOP.
Edited by: Konstantin Khrushchev on Jun 1, 2010 3:18 PM
The MIMEs are stored in the MIME repostory in "Folders" according to the WD Component, not the application. Therefore when you use ALV, the ALV Component is a separate Component. You can't reference you component specific image without supplying the path as well.
Change the reference to something like this:
../<Your WD Component>/'objtp_mer.gif
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
~zalv/objtp_mer.gif isn't really a URL. It is just a shortcut name to identify the component. I wouldn't expect CL_WDR_UTILITIES=>CONSTRUCT_MIME_URL to return that. However if it works why worry with CL_WDR_UTILITIES=>CONSTRUCT_MIME_URL. Just concatenate ~, the WD Component, /, and the image name.
I wouldn't have expected '/zalv/objtp_mer.gif' to work. You would be saying that /ZALV/ is a sub-folder of the ALV component. You would the .. to say you are going up a folder.
Sorry, i don`t understand.
Before writing on sdn i tried ~/ZALV/objtp_mer.gif
An exception occurred which is explained in detail below.
The exception, which is assigned to class 'CX_WDG_UR_WEB_ICON_EXCEPTION', was
not caught and
therefore caused a runtime error.
The reason for the exception is:
Es existiert kein WebIcon mit dem Alias "~/ZALV/objtp_mer.gif"
call stack in dump
40 METHOD CL_WDG_UR_WEB_ICON_REPOSITORY=CP CL_WDG_UR_WEB_ICON_REPOSITORY=CM008 19
CL_WDG_UR_WEB_ICON_REPOSITORY=>GET_ICON_URL_AND_TOOLTIP
39 METHOD CL_WDR_UTILITIES==============CP CL_WDR_UTILITIES==============CM002 63
CL_WDR_UTILITIES=>CONSTRUCT_MIME_URL
couse dump in table wdg_ur_web_icon, where no record.
in debuger in CONSTRUCT_MIME_URL i change R_URL on ~/ZALV/objtp_mer.gif and icon fine display.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
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.