on 04-13-2010 5:57 PM
Hello All,
I need to add a customized button called "Copy" on ALV. The following code is giving me few standard buttons like "Append" "Delete" "Insert" etc. So, how can I add "Copy" button besides one of these standard buttons.
data: l_value type ref to cl_salv_wd_config_table.
data: lr_table_settings type ref to if_salv_wd_table_settings.
lr_table_settings ?= l_value.
lr_table_settings->set_read_only( abap_false ).
Appreciate help.
Thks & Rgds,
Hemal
Hi Hemal,
Refer to the below link which has step by step example to create new buttons and place them in alv toolbar.
[Add new custom buttons in ALV toolbar - http://divulgesap.com/blog.php?p=NzI= |http://divulgesap.com/blog.php?p=NzI=]
Hope it helps.
Cheers,
Ravikiran
Edited by: Thomas Jung on Apr 14, 2010 8:32 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Create One method
And inside that method write the below code
(Here i am creating delete button you can create any name button you want just replace the name
DATA lV_EDITBTN TYPE REF TO cl_salv_wd_fe_button.
DATA lr_buttonui TYPE REF TO cl_salv_wd_fe_button.
CREATE OBJECT lr_buttonui.
lr_buttonui->set_text( 'Details' ).
lr_buttonui->set_tooltip(
'Shows Detail Screen as per the View selected' ).
Generating Function Object for Button.*
DATA btn_button TYPE REF TO cl_salv_wd_function.
btn_button = lo_value->if_salv_wd_function_settings~create_function(
id = 'DETAILS' ).
btn_button->set_editor( lr_buttonui ).
DATA lr_buttonui1 TYPE REF TO cl_salv_wd_fe_button.
----
After that create another method and make it as a event ( it means now it become event )
select event ON FUNCTION FROM THE LIST
Inside that event write
CASE LV_FCODE.
WHEN 'DETAILS'.
wd_this->fire_OP_TODEATILS_plg( ).
endcase.
----
May be it may help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.