on 03-31-2010 7:24 AM
Hi,
I have imported a Image as a mime object in WDA.Could you please let me know how to display this mime object image in a column of ALV.
Thanks in Advance.
Regards,
Arun.
Issue has been resolved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Use this Code
DATA: lr_column TYPE REF TO cl_salv_wd_column,
lr_image TYPE REF TO cl_salv_wd_uie_image,
lv_icon TYPE string.
lr_column = l_value->if_salv_wd_column_settings~get_column( 'Priority' ). "Define Column Name to display image
CREATE OBJECT lr_image.
lr_image->SET_SOURCE_FIELDNAME( 'Priorty' ).
lr_column->set_cell_editor( lr_image ).
Regards
Arun.P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
In that code the Priority is set with standard icons from SAP itself.
Refer this code snippet also
select * from zemptable into corresponding fields of table lt_emptable.
loop at lt_emptable into ls_emptable.
lv_dayspresent = ls_emptable-totdays - ls_emptable-adate.
if lv_dayspresent = 0.
ls_present-status = 'ICON_RED_LIGHT'.
elseif lv_dayspresent <= 50.
ls_present -status = 'ICON_YELLOW_LIGHT'.
else.
ls_present -status = 'ICON_GREEN_LIGHT'.
endif.
modify lt_emptable from ls_present transporting status.
endloop.
Here ICON_RED_LIGHT' is standard
Thanks & Regards
Arun.P
Hi Experts,
I have imported a mime object Green.bmp in my webdynpro application and I assigning the path to a field current_icon as mentioned in the below code.But I am not able to get the image in the column 'CURRENT_STATUS' .Please let me know your suggestions to bring a mime image in the column of the ALV.
current_icon = '/sap/bc/webdynpro/sap/ztest123/Green.bmp'.
DATA:lr_column TYPE REF TO cl_salv_wd_column,
lr_image TYPE REF TO cl_salv_wd_uie_image.
Set an Icon
lr_column = lo_value->if_salv_wd_column_settings~get_column( 'CURRENT_STATUS' ).
CREATE OBJECT lr_image.
lr_image->set_source_fieldname( 'CURRENT_ICON').
lr_column->set_cell_editor( lr_image ).
Regards,
Arun.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
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.