cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a WebDynpro Component from other

Former Member
0 Kudos

I have a WebDynpro Component. When i click on a button , i need to call another WD Component. How can i do this ?

Accepted Solutions (1)

Accepted Solutions (1)

uday_gubbala2
Active Contributor
0 Kudos

Hi Manju,

You can proceed as shown below. You need to just get the URL of the component which you want to call from your component using the static method construct_wd_url of class cl_wd_utilities. You then just have to pass this URL to the create_external_window method of if_wd_window_manager. (This part can be done by using the code wizard itself.)

Regards,

Uday

METHOD onactioncall .

  DATA : lv_url TYPE string.

  CALL METHOD cl_wd_utilities=>construct_wd_url
    EXPORTING
      application_name = 'Z187442_ALV1'
    IMPORTING
      out_absolute_url = lv_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( ).

  CALL METHOD lo_window_manager->create_external_window
    EXPORTING
      url    = lv_url
    RECEIVING
      window = lo_window.
  lo_window->open( ).
ENDMETHOD.

Former Member
0 Kudos

THanks for the answers. This really worked out. But When the 2nd application opened, if i place a BACK button on that and if i click on that i have to go back to the 1st application.

To get this we can again implement the above logic. But again another window opens.

Instead, the req is If i click on the button of 1st application, 2ns application should open in same window and if i click BACK button on 2nd application, the 1st application should get opened in the same window.

Former Member
0 Kudos

Hi Manjunath,

if you want in that way then use OutBound plug(Exit) of Window.When you click any button in the first view call exit plug to navigate to second application.

Repeat the same steps for second application also.

Check this code snippet to know how to use Outbound plug of a window.

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/snipppets%2b%2bweb%2bdynpro%2babap-%2bho...

Also check this document

http://help.sap.com/SAPHELP_NW04S/helpdata/EN/45/19bf8c16f25d7ae10000000a11466f/content.htm

Edited by: suman kumar chinnam on Oct 14, 2008 8:59 AM

Answers (1)

Answers (1)

Former Member
0 Kudos
Former Member
0 Kudos

Thanks suman. I am trying this out.