Hi, I provide training in SAP UI5. Also feel free to checkout my new web page https://saptechblog.com
Webdynpro ABAP

Calling one webdynpro application from another

In the previous post we have seen how to call a Web URL. In this post we will study how to call one webdynpro application from another.

 

The procedure is same as the before, by providing the link of the webdynpro component to the create external window method

The webdynpro application will be called. There is a method in a class cl_wd_utilities which will generated the url of the webdynpro component. We will proceed with the same application.

 

In the event handler method for the button ui element call the method construct_wd_url of the class cl_wd_utilities to get the URL of the

Webdynpro component.

 

Using pattern, call the method of the class CL_WD_UTITLITES as shown below.

 

clip_image002

 

 

Coding's will be generated as below.

 

clip_image004

 

Pass the webdynpro application name and receive the url using the importing parameter out_absolute_url.

 

clip_image006

 

Coding's in the method:

 

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( ).


data : lv_str type
string.

CALL METHOD
cl_wd_utilities=>construct_wd_url
 
EXPORTING

    application_name              =
'ZCSK_POP'
 
IMPORTING
    out_absolute_url              = lv_str
    .


CALL METHOD lo_window_manager->create_external_window
 
EXPORTING

    url            = lv_str
    modal          = ABAP_FALSE
    has_menubar    = ABAP_TRUE
    is_resizable   = ABAP_TRUE
    has_scrollbars = ABAP_TRUE
    has_statusbar  = ABAP_TRUE
    has_toolbar    = ABAP_TRUE
    has_location   = ABAP_TRUE
  receiving
   
window        
= lo_window
    .


lo_window->open( ).

 

 

Now test the application.

 

Output:

 

clip_image008

 

clip_image010

About Arun

0 Comments:

Post a Comment

Powered by Blogger.