cancel
Showing results for 
Search instead for 
Did you mean: 

Refersh Button/ ALV

Former Member
0 Kudos

Hi,

I want to add custom buttons for 'Refresh' in the existing row of the ALV grid

Any sample code on this please ?

Thanks,

Kumar

Accepted Solutions (1)

Accepted Solutions (1)

former_member262988
Active Contributor
0 Kudos

Hi,

data :  lr_btnui_e_add    TYPE REF TO cl_salv_wd_fe_button,   " Ref to the button
  lr_function_e_add TYPE REF TO cl_salv_wd_function.    " Ref to the standard button

   CREATE OBJECT lr_btnui_e_add.
    lr_btnui_e_add->set_text( 'REFRESH' ).

 DATA lo_value TYPE REF TO cl_salv_wd_config_table.
  lo_value = lo_interfacecontroller->get_model(
  ).

 lr_function_e_add =
    LO_VALUE->if_salv_wd_function_settings~create_function( id = 'REFRESH'  ).

where lo_value is the model of alv.......

This wil create a button on toolbar of alv...

Thanks,

Shailaja Ainala.

Former Member
0 Kudos

Hi,

Please let me know 'lo_interfacecontroller' is refering to ?

Thanks,

Kumar

former_member262988
Active Contributor
0 Kudos

Hi,

DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .

lo_interfacecontroller = wd_this->wd_cpifc_alv_recurring( ).

ref to interface controller of you alv component.

Thanks,

Shailaja Ainala.

Former Member
0 Kudos

How do we specify the method that handles the pression of the button ????

uday_gubbala2
Active Contributor
0 Kudos

Hi Stephan,

Please go through this [article |https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/101df93f-4b5c-2910-14aa-9eb0338c2110]which should answer all your questions. Here Rakesh an input field, separator & push button as toolbar elements in his ALV. He then handles the push button to read the value entered by the user in the input field.

Regards,

Uday

Former Member
0 Kudos

iT IS A VERY GOOD POST INDEED !

Do you have any idea where i could see a dropdown as functions in alv grid ?

Stephan

uday_gubbala2
Active Contributor
0 Kudos

Hi Stephan,

I haven't came across any article covering embedding of DropDowns as functions in an ALV. To be frank I haven't tried it out either... But think that it shouldn't be that hard by following the same approach. You just would have to use the CL_SALV_WD_FE_DROPDOWN_BY_IDX & CL_SALV_WD_FE_DROPDOWN_BY_KEY classes instead. In case you face any problems you can always seek assistance in here!

Regards,

Uday

Answers (0)