cancel
Showing results for 
Search instead for 
Did you mean: 

How to call a Mime Object in the column of a ALV.

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Issue has been resolved.

timobermueller
Explorer
0 Kudos

Hi Arun,

can you please explain me how you solved this issue? I've the same problem and I was not able to solve it till now ...

Best Regards

Tim

timobermueller
Explorer
0 Kudos

Ok, I solved it ...

former_member206441
Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Arun,

Thanks for your Quick Response.

Could you please let me know where do we need give the name of the mime object that has been created in WDA.

Regards,

Arun Kumar S

former_member206441
Contributor
0 Kudos

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

Former Member
0 Kudos

Hi,

I have created a customised mime(For Example:Paint.bmp) and I have imported this customised Mime in my customised Webdynpro.Please let me know to call this customised mime in the column of ALV.Thanks.

Warm Regards,

Arun.

former_member206441
Contributor
0 Kudos

Hi

[Refer this link|]

Regards

Arun.P

Former Member
0 Kudos

Hi,

Please let me know how to pass the mime content to the column of the ALV.

Because in the case of the above link the context attribute is directly binded to a image field.

Regrads,

Arun

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi

Check this thread:

Regards

Manas Dua