on 11-18-2008 8:52 PM
Friends,
I am working on an ALV table in a standard Web Dynpro ABAP application.
The business requirement is to hide the header and footer for the ALV table.
The header has a dropdown to choose u201CStandard Viewu201D and 2 options: Filter and Settings.
The footer for the ALV table containing the Row and Column numbering also needs to be hidden.
I am looking at the IF_SALV_WD_TABLE_SETTINGS to find the relevant methods to hide the header and footer.
Please let me know if I am on the right track and if there is an alternate way to do this through changing the layout of the ALV table. I tried to hide the header and footer manually via the layout but am unable to do so, as the ALV table is just displayed as ViewContainerUI Element.
Please help as I am new to ALV in WDA.
Thanks and Regards.
Have a look on this code which will hide 'export' and 'pdf' option from header. Doube click on if_salv_wd_std_functions on this interface and you will see all the function. Then just find out which you want to hide, get the method name from there and add the line in this code...and make as abap_false.
DATA: lr_cmp_usage TYPE REF TO if_wd_component_usage.
lr_cmp_usage = wd_this->wd_cpuse_cu_alv_search( ).
IF lr_cmp_usage->has_active_component( ) IS INITIAL.
lr_cmp_usage->create_component( ).
ENDIF.
DATA: lr_if_controller TYPE REF TO iwci_salv_wd_table,
lr_config_model TYPE REF TO cl_salv_wd_config_table.
lr_if_controller = wd_this->wd_cpifc_cu_alv_search( ).
lr_config_model = lr_if_controller->get_model( ).
lr_config_model->if_salv_wd_std_functions~set_export_allowed( abap_false ).
lr_config_model->if_salv_wd_std_functions~set_pdf_allowed( abap_false ).
Hope it works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
you cannot hide the header of an ALV in a once.
You have to disable each function seperatlly like this:
lo_alv_conf_mdl->if_salv_wd_std_functions~set_export_allowed( abap_false ).
lo_alv_conf_mdl->if_salv_wd_std_functions~set_pdf_allowed( abap_false ).
lo_alv_conf_mdl->if_salv_wd_table_settings~set_top_of_list_visible( abap_true ).
o_alv_conf_mdl->if_salv_wd_std_functions~set_filter_complex_allowed( abap_false ).
lo_alv_conf_mdl->if_salv_wd_std_functions~set_filter_filterline_allowed( abap_false ).
lo_alv_conf_mdl->if_salv_wd_std_functions~set_dialog_settings_allowed( abap_false ).
lo_alv_conf_mdl->if_salv_wd_std_functions~set_edit_append_row_allowed( abap_false ).
lo_alv_conf_mdl->if_salv_wd_std_functions~set_edit_check_available( abap_false ).
lo_alv_conf_mdl->if_salv_wd_std_functions~set_view_list_allowed( abap_false ).
This works in my case.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Closing and opening another thread as the header is hidden and only the footer remains.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why not you use table contorl, if you want to hide all options of ALV. Is there any specific reason.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just a small addition to the above provided help
Set the properties for the below method in l_table (cl_salv_wd_config_table) ,
IF_SALV_WD_TABLE_SETTINGS~SET_TOP_OF_LIST_VISIBLE
IF_SALV_WD_TABLE_SETTINGS~SET_FOOTER_VISIBLE
Cheers,
Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Kumar,
I have added the following lines of code to WDDOINIT code.
value->if_salv_wd_table_settings~set_footer_visible( ).
value->if_salv_wd_table_settings~set_top_of_list_visible( ).
These method calls seems to make the header and footer visible. How to make them invisible. What values should i pass as parameter to these methods. I tried giving abap_false as parameter but error occurs.
Please help.
Thanks and Regards.
Hi Hskok,
I added the following 2 lines of code:
value->if_salv_wd_table_settings~set_footer_visible( FOOTER_VISIBLE_FALSE ).
value->if_salv_wd_table_settings~set_top_of_list_visible( abap_false ).
I get the error:
Field "FOOTER_VISIBLE_FALSE" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement.
the second line of code (set_top_of_list_visible) has no effect on the header or footer.
Thanks and Regards.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.