on 10-07-2015 8:12 PM
Dear Mates,
I have designed an ALV, in which i have few views as shown at below image. I have created these views through configuration. Now i need to read in my code which view has been selected by the user.
I have created event handler for event ON_STD_FUNCTION_AFTE to read the selected view name. Below is the code where am getting an error is "wd_this->wd_cpifc_alv_table( ) is unknown", Please let me know the reason why or tell me any other way to read the ALV dropdown selected view name:
data lo_alv_ifc type ref to iwci_salv_wd_table.
data ls_config_in type if_salv_wd_table=>s_type_param_config_in.
data ls_config_out type if_salv_wd_table=>s_type_param_config_out.
data lo_model type ref to cl_salv_wd_config_table.
data lo_field type ref to cl_salv_wd_field.
* Get the ALV interface controller
lo_alv_ifc = wd_this->wd_cpifc_alv_table( ).
case r_param->id.
* Handle selection of an ALV view variant
when if_salv_wd_c_std_functions=>view_load " select view from view dropdown
or if_salv_wd_c_std_functions=>settings. " select view from settings > ok/apply
* Determine what ALV view variant is currently selected
ls_config_in-action = if_salv_wd_table=>actual.
ls_config_out = lo_alv_ifc->get_config_data( ls_config_in ).
* Process each ALV view variant as needed
case ls_config_out-view-description.
when 'Standard Profile View'.
when others. " other view variants
endcase. " view variant
when others. " other standard functions
endcase. " ALV standard function
Hi,
lo_alv_ifc = wd_this->wd_cpifc_alv_table( ).
alv_table is the name of component usage for the ALV component. replace this with the component usage name which you have used.
lo_alv_ifc = wd_this->wd_cpifc_<ALV_Usage_Name>( ).
hope this helps,
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
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.