on 02-10-2012 4:48 AM
Hi,
I have 2 web dynpro components.(COMP1 and COMP2). I wants to call the application of COMP2 from a button click from COMP1.
1. In COMP1 view i have a button. I have created an outbound plug 'TO_APP' with parameter 'URL' type string.
2. Inside the event handler method for the button i have written the code as given below.
data str_url type string.
CALL METHOD cl_wd_utilities=>construct_wd_url
EXPORTING
application_name = 'COMP2_APP'
IMPORTING
out_absolute_url = str_url
.
wd_this->fire_to_app_plg(
url = str_url
).
When i click the button it wont navigate to COMP2. Is there any other step required ?
Please helps me to solve this issue...
Regards,
Shaira.
In your button action just copy this and try
data str_url type string.
CALL METHOD cl_wd_utilities=>construct_wd_url
EXPORTING
application_name = 'COMP2_APP'
IMPORTING
out_absolute_url = str_url
.
data lo_window_manager type ref to if_wd_window_manager.
data lo_api_component type ref to if_wd_component.
data lo_window type ref to if_wd_window.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
lo_window = lo_window_manager->create_external_window(
url = str_url ).
lo_window->open( ).
Regards
Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
To call URL in same window first create an outbound plug in your current window(ex: EXIT_PLUG ),mark this
EXIT_PLUG as interface and plug type EXIT. Now use the following code in your button action.
data : lr_view_cont TYPE REF TO if_wd_view_controller.
data : lr_win_cont TYPE REF TO if_wd_window_controller.
data : lt_parameter_list type wdr_event_parameter_list.
data : ls_parameter type wdr_event_parameter.
data : lr_val type ref to data.
data : lr_comusg type ref to if_wd_component_usage.
field-SYMBOLS : <fs> type any.
lr_view_cont = wd_this->wd_get_api( ).
CALL METHOD LR_VIEW_CONT->GET_EMBEDDING_WINDOW_CTLR
RECEIVING
RESULT = lr_win_cont
.
ls_parameter-name = 'URL'.
create data lr_val type string.
assign lr_val->* to <fs>.
<fs> = 'HTTP://APPLICATION URL' . "PASS YOUR URL HERE
ls_parameter-value = lr_val.
insert ls_parameter into TABLE lt_parameter_list.
lr_win_cont->if_wd_view_controller~fire_plug(
exporting
plug_name = 'EXIT_PLUG'
parameters = lt_parameter_list ).
User | Count |
---|---|
77 | |
9 | |
9 | |
7 | |
7 | |
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.