cancel
Showing results for 
Search instead for 
Did you mean: 

How to use icons in a webdynpro ALV column? Please help

gopalkrishna_baliga
Participant
0 Kudos

Hi Experts,

I have a webdynpro for ABAP report taht contains ALV table. In one column named 'Flag' I haev show icons as values. How to code this?

Kindly provide some sample coding.

Thanks

Gopal

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member223219
Participant
0 Kudos

hi katrice,

I am not using button i am using icon. i want to know if the icon is clicked the n it should go to that view. how to give link for icon? where we need to give the outbound plug name?

former_member223219
Participant
0 Kudos

hi,

i created an icon in ALV column but i cant navigate to other view by clicking an icon. It is navigate without clicking an icon. my requirement is if the icon is clicked the n it should go to that view. Anybody know the answer pls tell me....

Former Member
0 Kudos

Hi,

On click of ALV button, fire an outboud plug to navigate to other view.

Thanks

KH

Former Member
0 Kudos

Hi gopalkrishna,

Go through this article. It will guide you to create icons in a column.

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1190424a-0801-0010-84b5-ef03fd2d33d9">Programming the ALV Configuration Model in Web Dynpro for ABAP</a>

Hope it Helps

Regards

Rakesh

Former Member
0 Kudos

Hi,

in the wddoinit method of your view, you can change the settings of an used ALV.

If you want to display an icon in a column, you have to set a cell editor to your column.

Hope the below code helps.

Data:

lr_column TYPE REF TO cl_salv_wd_column,

lr_image TYPE REF TO cl_salv_wd_uie_image,

l_value TYPE REF TO cl_salv_wd_config_table,

l_ref_cmp_usage TYPE REF TO if_wd_component_usage,

l_interface TYPE REF TO iwci_salv_wd_table.

  • Instantiate the component usage for your ALV Table

l_ref_cmp_usage = wd_this->wd_cpuse_NAME_OF_ALV_COMP_USAGE( ).

IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.

l_ref_cmp_usage->create_component( ).

ENDIF.

  • get the model of the ALV

l_interface = wd_this->wd_cpifc_facts_table( ).

l_value = l_interface->get_model( ).

  • Set an Icon as cell editor

lr_column = l_value->if_salv_wd_column_settings~get_column( 'Field_Name' ).

CREATE OBJECT lr_image.

lr_image->set_source( 'ICON_XY').

lr_column->set_cell_editor( lr_image ).

more help look at:

http://help.sap.com/saphelp_nw2004s/helpdata/en/43/2808494f49601ee10000000a422035/frameset.htm

Hope it helps.

regards

Christian