Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to load SALV_WD_TABLE with a special view layout


I programmed an own WD application and use the SALV_WD_TABLE component for output.

I want to start the SALV_WD_TABLE with a specific user indepentend view. I saved three user indepent views and set view2 as default.

At my own application I have a config controller where I can define with explicit configuration, which view I want to start for the SALV_WD_TABLE at startup.

In the explicit configuration I set view3. But I'm only able to start SALV_WD_TABLE with view2 which is saved as default or none selected view.

But I didn't made it to start with the view I want

with this code, i can see the views user or userindepent stored for the SALV_WD_TABLE for my application


l_ref_if_controller TYPE REF TO iwci_salv_wd_table,

l_ref_if_controller = wd_this->wd_cpifc_cp_alv( ).


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_param_in-action = if_salv_wd_table=>list.

ls_param_out = l_ref_if_controller->get_config_data( ls_param_in ).


In the debugger, I see a config_id with the value F8617BC78539D8B80FFAD1BBA1C95333. And the variant i want to load, has in the debugger the config_var 'QHXJ6S'. But when i try to implement it with this code, I don't get load my wanted view and also not the as default stored view. The view list is set to blank.

<i>data: l_key type string.

l_key = 'F8617BC78539D8B80FFAD1BBA1C95333'.


ls_param_in-action = if_salv_wd_table=>load.

ls_param_in-config_key-config_type = '07'.

ls_param_in-config_key-config_id = l_key.

ls_param_in-config_key-config_var = 'QHXJ9S'.

l_ref_if_controller->get_config_data( ls_param_in ).


Not what you were looking for? View more on this topic or Ask a question