on 08-12-2014 2:31 PM
Hiya,
I have an ALV table in a web dynpro but would anyone know how to:
Remove these default buttons i.e. Print Version, Export,Check, Append row etc:
I know you can do this in normal ALVs but I'm stuck on how to do this in webdynpro.
Also would anyone know how to disable the ability to select in the ALV:
Thanks in advance!
Hi,
here are a lot of things you can set check or use for the ALV
DATA:
lo_nd_ct_xxx_dta TYPE REF TO if_wd_context_node,
lo_table_settings TYPE REF TO if_salv_wd_table_settings,
lo_std_functions TYPE REF TO if_salv_wd_std_functions,
lo_config_table TYPE REF TO cl_salv_wd_config_table,
lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
lo_nd_ct_xxx_dta = wd_context->get_child_node( name = wd_this->wdctx_ct_xxx_dta ).
lo_interfacecontroller = wd_this->wd_cpifc_usage_alv( ).
lo_interfacecontroller->set_data( r_node_data = lo_nd_ct_xxx_dta ).
lo_config_table = lo_interfacecontroller->get_model( ).
lo_table_settings ?= lo_config_table.
lo_table_settings->set_selection_mode( cl_wd_table=>e_selection_mode-single ).
lo_table_settings->set_visible_row_count( 20 ).
* lo_table_settings->set_display_empty_rows( abap_false ).
* lo_table_settings->set_read_only( abap_true ).
* lo_table_settings->set_enabled( abap_true ).
* lo_table_settings->set_edit_mode( ).
* lo_table_settings->set_refresh_on_data_change( ).
lo_std_functions ?= lo_config_table.
lo_std_functions->set_dialog_settings_allowed( abap_true ).
lo_std_functions->set_export_allowed( abap_true ). "default
lo_std_functions->set_view_list_allowed( abap_false ).
* lo_std_functions->set_edit_append_rows_allowed( abap_false ).
* lo_std_functions->set_edit_append_row_allowed( abap_false ).
* lo_std_functions->set_edit_delete_row_allowed( abap_false ).
* lo_std_functions->set_edit_insert_rows_allowed( abap_false ).
* lo_std_functions->set_edit_insert_row_allowed( abap_false ).
* lo_std_functions->set_edit_check_available( abap_false ).
* lo_std_functions->set_pdf_allowed( abap_false ).
Greetings Maarten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As Riel told, handle those piece of code in your WDDOINT method of your ALV view.
BR,
RAM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Add the following code in the WDDOINIT of your view that contains the ALV.
DATA: lo_cmp_usage type ref to if_wd_component_usage,
lo_interfacecontroller type ref to iwci_salv_wd_table,
lo_value type ref to cl_salv_wd_config_table.
*
lo_cmp_usage = wd_this->wd_cpuse_usage_alv( ).
if lo_cmp_usage->has_active_component( ) is initial.
lo_cmp_usage->create_component( ).
endif.
*
lo_interfacecontroller = wd_this->wd_cpifc_usage_alv( ).
lo_value = lo_interfacecontroller->get_model( ).
*
lo_value->if_salv_wd_function_settings~set_visible( cl_wd_uielement=>e_visible-none )
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.