on 05-28-2007 8:37 AM
Hi,
i want to add an exit button in my ALV toolbar wherein it should exit the browser or the URL which displays the output. Plzz help me on this.
Thanks.
Hi,
the following code may help you:
DATA:
l_ref_cmp_usage TYPE REF TO if_wd_component_usage,
l_interface TYPE REF TO iwci_salv_wd_table,
lr_table TYPE REF TO cl_salv_wd_config_table.
create alv component
l_ref_cmp_usage = wd_this->wd_cpuse_<name_of_alv_comp>( ).
IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
l_ref_cmp_usage->create_component( ).
ENDIF.
get config models
l_interface = wd_this->wd_cpifc_alv_activities_prdstd( ).
lr_table = l_interface->get_model( ).
create the toolbar button
DATA:
lr_functions TYPE REF TO if_salv_wd_function_settings,
lr_function TYPE REF TO cl_salv_wd_function,
lr_fe_button TYPE REF TO cl_salv_wd_fe_button.
lr_functions ?= lr_table.
lr_function = lr_functions->create_function( 'MYBUTTON' ).
CREATE OBJECT lr_fe_button.
lr_fe_button->set_text( 'MyButton' ).
lr_function->set_editor( lr_fe_button ).
After that add an event handler for the ON_FUNCTION event of the alv. In this method you can do whatever you want.
Kind Regards,
Anika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.