cancel
Showing results for 
Search instead for 
Did you mean: 

how to add button ui element in alv table data in web Dynpro ABAP

Former Member
0 Kudos

Hi Experts,

I have one requirement,

Actually I was devloped normal table in web Dynpro ABAP

in that i have one column Display as a button .

when i select that button need to display some data.

same requirement i need to devlope in alv table.

i am going to attach file please check.

Thanks in advance.

Regards,

Subba Reddy.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can create Button in your ALV table column with below code

DATA lo_button              TYPE REF TO cl_salv_wd_uie_button.

CREATE OBJECT lo_button.

    CALL METHOD lv_value->if_salv_wd_column_settings~get_column
      EXPORTING
        id    = <your column name>
      RECEIVING
        value = lo_system_select_hdr.



    lo_button->set_enabled( value = abap_true ).

   lo_button->set_text( value = 'Avaliable List).

    lo_button->set_tooltip( value = 'Avaliable List' ).

    lo_system_select_hdr->set_cell_editor( value = lo_button ).

And for button click action,

Create a method (say SHOW_DATA( ) ) with on_click event handler.And when you click button on your ALV table, SHOW_DATA( ) method will trigger.

Thanks

KH

Answers (2)

Answers (2)

former_member184578
Active Contributor
0 Kudos

Hi,

You need to change the cell editor of the ALV column to button using cl_salv_wd_uie_button.

Sample code:

* Display button in column carrid

DATA: lr_button TYPE REF TO cl_salv_wd_uie_button.

lr_column = l_value->if_salv_wd_column_settings~get_column( 'CARRID'

).

CREATE OBJECT lr_button.

lr_button->set_text_fieldname( 'CARRID' ).

lr_column->set_cell_editor( lr_button ).

Regards,

Kiran

ramakrishnappa
Active Contributor
0 Kudos

Hi Reddy,

You need to create a button and set it as editor for alv column. Implement ON_CLICK event to handle the action of button and populate the related data.

Please refer the below link

Web Dynpro ABAP ALV - ON_CLICK event

Hope this helps you.

Regards,

Rama