on 07-08-2011 6:54 AM
Hi Experts
Is it possible to remove "Export to Excel" option from an ALV in Web Dynpro.
Thanks in advance
Gaurav Kaneria
Hi Gaurav,
use the following code..
data: lr_std TYPE REF TO if_salv_wd_std_functions.
l_VALUE type ref to Cl_Salv_Wd_Config_Table.
l_VALUE = l_ref_INTERFACECONTROLLER->Get_Model( ).
lr_std ?= l_value.
lr_std->SET_EXPORT_ALLOWED( abap_false ).
lr_std->SET_PDF_ALLOWED( abap_false ).
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.,
l_ref_INTERFACECONTROLLER is the pointer to ALV interface Colntroller
try this.,
data: l_ref_INTERFACECONTROLLER TYPE REF TO iwci_salv_wd_table,
l_ref_INTERFACECONTROLLER = wd_this->wd_cpifc_alv( ).
from this same as suggested by kris.,
> l_VALUE type ref to Cl_Salv_Wd_Config_Table.
> l_VALUE = l_ref_INTERFACECONTROLLER->Get_Model( ).
> lr_std ?= l_value.
> lr_std->SET_EXPORT_ALLOWED( abap_false ).
> lr_std->SET_PDF_ALLOWED( abap_false )
hope this helps u.,
Thanks & Regards,
Kiran
Dear all
more errors,
1. wd_this->wd_cpifc_alv_comp is unknow or private or protected
2. lo_value = lo_interfacecontroller->get_model( ). this assignment is not possible
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First, in your view, you wiil find "PROPERTIES " TAB, in that click on create usage controller, in that select interface controller of your alv. then write the below code.
in wddoinit method write below code
DATA LO_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
LO_CMP_USAGE = WD_THIS->WD_CPUSE_ALV1( ).
IF LO_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
LO_CMP_USAGE->CREATE_COMPONENT( ).
ENDIF.
DATA LO_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
LO_INTERFACECONTROLLER = WD_THIS->WD_CPIFC_ALV1( ).
DATA LO_VALUE TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
LO_VALUE = LO_INTERFACECONTROLLER->GET_MODEL(
).
DATA: LR_STD TYPE REF TO IF_SALV_WD_STD_FUNCTIONS.
LR_STD ?= LO_VALUE.
LR_STD->SET_EXPORT_ALLOWED( ABAP_FALSE ).
For removing view in Standard ALV
LR_STD->SET_VIEW_LIST_ALLOWED( ABAP_FALSE ).
For removing Setting in Standard ALV
LR_STD->SET_DIALOG_SETTINGS_ALLOWED( ABAP_FALSE ).
For removing Print Version in Standard ALV
LR_STD->SET_PDF_ALLOWED( ABAP_FALSE ).
Regards
srinivas
I pasted the same code in the DO_INIT method of the corresponding view. Got an error saying "The field "L_REF_INTERFACECONTROLLER" is unknown, but there is a field with the similar name "WDYN_INTERFACE_CONTROLLER_NAME" . . . .
when i try with the other name. It says that it is not a reference variable.Revert soon.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Try this...
data lo_interfacecontroller type ref to iwci_salv_wd_table .
lo_interfacecontroller = wd_this->wd_cpifc_alv_comp( ).
data lo_value type ref to cl_salv_wd_config_table.
lo_value = lo_interfacecontroller->get_model( ).
CALL METHOD lo_value->if_salv_wd_std_functions~SET_EXPORT_ALLOWED( value = abap_false ).
CALL METHOD lo_value->if_salv_wd_std_functions~set_pdf_allowed( value = abap_false ).
cheers,
Kris.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
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.