cancel
Showing results for 
Search instead for 
Did you mean: 

Launch URL automatically from Component Controller

Former Member
0 Kudos

Hi All,

Need help in a fairly simple requirement though that I am trying to achieve through a WebDynpro ABAP application.

I have developed an application where in the wdInit() method of the Component Controller I am doing certain calculations based upon which a dynamic URL is generated. Now my requriement says that I need to trigger some kind of an outbound plug through which I should be able to navigate to this URL. Please, kindly advise and help me get there!!!

Do revert back in case there are any further information needed from my end.

Thanks and Regards,

Abhishek Goel.

Accepted Solutions (1)

Accepted Solutions (1)

former_member210266
Active Participant
0 Kudos

Hi Abhishek

You don't need to create an outbound plug for that. Just use method CREATE_EXTERNAL_WINDOW of window manager

  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          = url

        title        = 'Test' ).

  lo_window->open( ).

Regards

Swati

Former Member
0 Kudos

Sure I can do that, but in this case there would only be an external window created where as I want my application itself to navigate to this URL.

Please suggest how can I achieve that...

sreenu_b2
Explorer
0 Kudos

1. Yon can store this URL as an attribute in CC
2. Maintain an EXIT plug in window with parameter URL of Type string


3. DO a check for the attribute of CC , in WDDOINIT of Window controller ,

Fire this exit plug and pass the url generated in step 1.

This should work out.

former_member210266
Active Participant
0 Kudos

The Exit plug as suggested by Sreenu is the solution in your case.

Apart from URL you can also pass another parameter CLOSE_WINDOW which will close the current application and then navigate to the URL given.

But the CLOSE_WINDOW parameter does not work with all the browsers.

You can read this SAP help documentation for more details

http://help.sap.com/saphelp_nw04s/helpdata/en/45/1bc575ba064574e10000000a114a6b/content.htm

sreenu_b2
Explorer
0 Kudos

Hi Swathi  ,

You cannot use URL and close_window both at same time.

Exit will terminate the running application when URL is passed.

If URL not passed then to close the window you can use close_window.

Former Member
0 Kudos

Thanks Srinivas and Swati for taking such prompt initiative getting this resolved and sincere apologies for getting back to guys after a long break.

But after going through the suggestion I found that the EXIT plugs do not work in portal environment mentioned within the link provided by Swati(screenshot for the same inserted below).

Please suggest any alternate approach.

Thanks,

Abhishek Goel.

former_member210266
Active Participant
0 Kudos

Hi Abhishek

Have a look at the following link.May be it will help you.

http://scn.sap.com/thread/748246

or try this code :

      DATA: lo_portal_int         TYPE REF TO if_wd_portal_integration,
                lo_application        TYPE REF TO if_wd_application.

       lo_application = io_api_component->get_application( ).

      IF lo_application->get_client_environment( ) = if_wd_application=>co_client_environment-portal.

      " Get portal integration
      lo_portal_int = io_api_component->get_portal_manager( ).

      " Start navigation
      lo_portal_int->navigate_absolute( navigation_target   = lw_navigation_path
                                        navigation_mode     = if_wd_portal_integration=>co_show_inplace
                                        history_mode        = if_wd_portal_integration=>co_allow_duplicates
                                        business_parameters = li_parameters ).

    ENDIF.

Regards

Swati

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks a lot Swati and Srinivas, both of you had been a lot of help. I finally went ahead with Srinivas's solution as per clients requirement.

Thanks and Regards,

Abhishek Goel.