cancel
Showing results for 
Search instead for 
Did you mean: 

How to display an image in an alv grid in each corresponding row?

Former Member
0 Kudos

Hi,

please tell me how to  display an image in an alv grid in each corresponding row, like;;

tony            23   newyork      <image>

Mkitharyan  63   washington  <image>

NOT BY HOTSPOTS/URL.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

you can put image in each cell you want:

data lo_cmp_usage type ref to if_wd_component_usage.

  lo_cmp_usage =   wd_this->wd_cpuse_alv( ).

  if lo_cmp_usage->has_active_component( ) is initial.

    lo_cmp_usage->create_component( ).

  endif.

  DATA lo_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .

  lo_INTERFACECONTROLLER =   wd_this->wd_cpifc_alv( ).

    DATA lo_value TYPE ref to cl_salv_wd_config_table.

    lo_value = lo_interfacecontroller->get_model(    ).

data col type ref to  CL_SALV_WD_COLUMN.

col = lo_value->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'IMAGE' ).

data image type ref to cl_salv_wd_uie_image.

CREATE OBJECT image.

image->SET_SOURCE_FIELDNAME( 'IMAGE' ).

COL->SET_CELL_EDITOR( image  ).

former_member194739
Active Participant
0 Kudos

Dear Farzin,

This is Webdynpro code. This is not ALV ABAP code.

Regards,

Abbas.

Former Member
0 Kudos

did you try this one?

CL_SALV_WD_UIE_LINK_TO_ACTION->SET_IMAGE_SOURCE_FIELDNAME

I don't know if it is working for cells or not

former_member194739
Active Participant
0 Kudos

Dear Farzin,

this webdynpro code.

Regards,

Abbas.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I have never seen such ALV report... may be not possible.... You can display ICONs in ALV.There is a table called ICON . Check the contents and get the appropriate ICON name and use it in the fieldcat.

Make a column in alv as hotspot\button and on clicking it display a popup inside which display the pic...

former_member194739
Active Participant
0 Kudos

Hi Nadeem,

It is not possible in normal ALV ABAP, It is possible in Webdynpro ABAP.

Regards,

Abbas.