The main use of this blog is to understand the passing of values from a Webdynpro application to another Webdynpro application.
We have created two Webdynpro applications say A and B. A is the calling application and B is the called application. Both A and B has one common attribute which is necessary for link between them (like SO number is common between these two applications).
After any event on application A, application B should start in a new window.
For this, we have to write this pseudo code in the event method of application A.
Pseudo code in application A:
First we need URL of the application B. Store this value in a string type variable say lv_url.
call method cl_wd_utilities=>construct_wd_url
exporting
application_name = ‘B’
importing
out_absolute_url = lv_url.
Attach the parameters and its value with the URL that have to be passed to the 2nd application
call method cl_http_server=>append_field_url
exporting
name = * Name of the field
value = *Value of the field
changing
url = lv_url.
After doing this, we have to create a popup window which shows application B. This can be achieved by using following code template.
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 = lv_url ).
lo_window->open( ).
Pseudo code in application B:
In this application, we have to receive the value send by Application A and select the records based on this value. For this, we have to write code in WDDOINIT method in application B.
*We have to define a variable which stores value coming from application A.
Data: lv_value type String.
lv_value = wdr_task=>client_window->get_parameter( ‘Name_of_the_Field’ ).
After getting the value in the lr_value field, we can select records based on this value and bind the internal table by using method bind table for displaying records.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
5 | |
3 | |
3 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |