on 04-28-2009 3:12 PM
Hi Experts,
I am trying to hide the buttons in ALV table.
I did hide all other buttons except "Print Version".
Can anyone assist.
Thanks,
Siva.
HI Sivasankar,
this is the code to disable it:
l_value->if_salv_wd_std_functions~set_pdf_allowed( abap_false ).
Regards,
Abdul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think use this "'SALV_WD_EXPORT' to hide the print version
Use the below code -
***Reference to the standard button reference of the ALV
DATA:
ls_functions_std type SALV_WD_S_FUNCTION_STD_REF.
***Modifying The standard functionality buttons
if lt_functions_std1 is not initial.
loop at lt_functions_std1 into ls_functions_std.
case ls_functions_std-id.
when wd_assist->GC_APPEND_ROW. "'SALV_WD_INPUT_APPEND_ROW'
CALL METHOD LS_FUNCTIONS_STD-R_FUNCTION->SET_VISIBLE
EXPORTING
VALUE = CL_WD_UIELEMENT=>E_VISIBLE-NONE.
when wd_assist->GC_INPUT_DELETE. "'SALV_WD_INPUT_DELETE'
CALL METHOD LS_FUNCTIONS_STD-R_FUNCTION->SET_VISIBLE
EXPORTING
VALUE = CL_WD_UIELEMENT=>E_VISIBLE-NONE.
when wd_assist->GC_INSERT_ROW. "'SALV_WD_INPUT_INSERT_ROW'
CALL METHOD LS_FUNCTIONS_STD-R_FUNCTION->SET_VISIBLE
EXPORTING
VALUE = CL_WD_UIELEMENT=>E_VISIBLE-NONE.
when wd_assist->GC_EXPORT_EXCEL. "'SALV_WD_EXPORT_EXCEL'
CALL METHOD LS_FUNCTIONS_STD-R_FUNCTION->SET_VISIBLE
EXPORTING
VALUE = CL_WD_UIELEMENT=>E_VISIBLE-NONE.
when wd_assist->GC_PDF. "'SALV_WD_PDF'
CALL METHOD LS_FUNCTIONS_STD-R_FUNCTION->SET_VISIBLE
EXPORTING
VALUE = CL_WD_UIELEMENT=>E_VISIBLE-NONE.
when wd_assist->GC_INPUT_CHECK. "'SALV_WD_INPUT_CHECK'
CALL METHOD LS_FUNCTIONS_STD-R_FUNCTION->SET_VISIBLE
EXPORTING
VALUE = CL_WD_UIELEMENT=>E_VISIBLE-NONE.
when wd_assist->GC_EXPORT. "'SALV_WD_EXPORT'
CALL METHOD LS_FUNCTIONS_STD-R_FUNCTION->SET_VISIBLE
EXPORTING
VALUE = CL_WD_UIELEMENT=>E_VISIBLE-NONE.
when wd_assist->GC_FILTER . "'SALV_WD_FILTER'
CALL METHOD LS_FUNCTIONS_STD-R_FUNCTION->SET_VISIBLE
EXPORTING
VALUE = CL_WD_UIELEMENT=>E_VISIBLE-NONE.
when wd_assist->GC_SETTINGS. "'SALV_WD_SETTINGS'
CALL METHOD LS_FUNCTIONS_STD-R_FUNCTION->SET_VISIBLE
EXPORTING
VALUE = CL_WD_UIELEMENT=>E_VISIBLE-NONE.
endcase. "Case ls_functions_std-id
clear LS_FUNCTIONS_STD.
endloop. "LOOP at lt_functions_std1 into ls_functions_std.
endif. "IF lt_functions_std1 is not initial.
Regards,
Lekha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
q
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
q
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check interface if_wd_std_functions, this has a wide range of toolbar functions. The fucntions that you want to disable/hide just set the value as false as follows :
* disable standard fucntions
lo_value->if_salv_wd_std_functions~set_pdf_allowed( abap_false ).
lo_value->if_salv_wd_std_functions~set_edit_check_available( abap_false ).
lo_value->if_salv_wd_std_functions~set_edit_insert_row_allowed( abap_false ).
lo_value->if_salv_wd_std_functions~set_edit_delete_row_allowed( abap_false ).
lo_value->if_salv_wd_std_functions~set_sort_headerclick_allowed( abap_false ).
Regards,
Radhika.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
put the below codes in WDDOINIT of COMPONENTCONTROLLER
DATA lo_cmp_usages TYPE REF TO if_wd_component_usage.
DATA lo_interfacecontroller TYPE REF TO IWCI_SALV_WD_TABLE .
DATA lv_value TYPE REF TO cl_salv_wd_config_table.
* Output is the Component Use deifined for component SALV_WD_TABLE
lo_cmp_usages = wd_this->wd_cpuse_output( ).
IF lo_cmp_usages->has_active_component( ) IS INITIAL.
lo_cmp_usages->create_component( ).
ENDIF.
lo_interfacecontroller = wd_this->wd_cpifc_output( ).
lv_value = lo_interfacecontroller->get_model( ).
* Hide the Print Version from ALV Toolbar
lv_value->if_salv_wd_std_functions~set_pdf_allowed( ABAP_False ).
Hope this will resolve your issue.
Regds
Pksurya
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.