on 06-08-2009 4:28 PM
Hello,
in my web dynpro component MAIN_APPL I have to call another web dynpro component (either WD_APPL1, WD_APPL2 or WD_APPL3) but dynamically. I´ve done it staticly by declaring the component WD_APPL1 in folder Used components of the main component, later I use a ViewContainerUIelement in the view for embedding the component and declare the component use in the properties of the view, etc. etc.
The information that I´ve found here and in the SAP manual is confusing me totally.
Can anyone explain how to do this dynamically ??
Thanks in advance.
There is an API for this. It is method do_dynamic_navigation of if_wd_view_controller. It lets you fill an existing ViewContainerUIElement with a dynamic component usage.
data: target_component_name type string,
target_view_name type string,
source_plug_name type string.
case node_index.
when 1.
target_component_name = 'ZZ_00_SFLIGHT'.
target_view_name = target_component_name.
source_plug_name = 'OUT_PLUG1'.
****Other Examples Navigations
endcase.
l_api_main = wd_this->wd_get_api( ).
try.
l_api_main->do_dynamic_navigation(
source_window_name = 'MAIN'
source_vusage_name = 'MAIN_VIEW_USAGE_1'
source_plug_name = source_plug_name
target_component_name = target_component_name
target_view_name = target_view_name
target_plug_name = 'DEFAULT'
target_embedding_position = 'MAIN_VIEW/VIEW_CONTAINER').
.
catch cx_wd_runtime_repository .
raise exception type cx_wdr_rt_exception.
endtry.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
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.