on 06-25-2013 11:28 AM
Hello experts,
I'm trying to dynamically determine a personalisation view ( set in Administrator mode, so everyone can use it )
It is working, but it is not updating the selected View. In the text box of selected view the Default view is still showing, not the one I selected by programming.
I used this SAP Help:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/93/47854a8366474f8bedabdcc43b2387/content.htm?frameset=/en/43/5f9c292a2b5f85e10000000a1553f6/frameset.htm
This is my code:
DATA: lt_alv_views TYPE wdr_pers_variants,
ls_alv_view TYPE wdr_pers_variant,
ls_param_out TYPE if_salv_wd_table=>s_type_param_config_out,
ls_param_in TYPE if_salv_wd_table=>s_type_param_config_in,
ls_customer TYPE zmm_s_kunnr_name,
lv_customer_country TYPE vkorg.
" List views
ls_param_in-action = if_salv_wd_table=>list.
ls_param_out = io_if_salv_table->get_config_data( ls_param_in ).
lt_alv_views[] = ls_param_out-t_view_list[].
" Load view
ls_param_in-action = if_salv_wd_table=>load.
READ TABLE lt_alv_views[] INTO ls_param_in-view WITH KEY config_var = 'P1ILNX'.
IF sy-subrc EQ 0.
ls_param_out = io_if_salv_table->get_config_data( ls_param_in ).
ENDIF.
Can anyone help me out how to 'refresh' the selected personalisation view in the SALV?
Thanks in advance!
Kind regards,
Wouter
Hi,
Following works for me:
DATA: lt_alv_views TYPE wdr_pers_variants,
ls_param_out TYPE if_salv_wd_table=>s_type_param_config_out,
ls_param_in TYPE if_salv_wd_table=>s_type_param_config_in.
FIELD-SYMBOLS: <ls_alv_view> TYPE wdr_pers_variant.
ls_param_in-action = if_salv_wd_table=>list.
ls_param_out = lo_comp_if_alv->get_config_data( ls_param_in ).
lt_alv_views[] = ls_param_out-t_view_list[].
READ TABLE lt_alv_views ASSIGNING <ls_alv_view> WITH KEY description = 'FULL'.
IF sy-subrc = 0.
ls_param_in-action = if_salv_wd_table=>set.
ls_param_in-view = <ls_alv_view>.
MOVE-CORRESPONDING <ls_alv_view> TO ls_param_in-config_key.
ls_param_out = lo_comp_if_alv->get_config_data( ls_param_in ).
ENDIF.
Best regards,
Guillaume
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Shouldn't the action if_salv_wd_table=>set be used instead of if_salv_wd_table=>load?
Best regards,
Guillaume
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
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.