Skip to Content

Call a URL from Webdynpro, at INIT method

My requirement: When user tries to open my webdynpro application, it first checks if the user is logging on to the system for the first time. If yes, then he is to be taken to a BSP application page, to make a few settings. Once done, the BSP application will redirect him back to my application.

Where I am stuck: In my webdynpro, in method WDDOINIT, I want to write the code to navigate to another url (URL for my BSP application). But, I couldn't find any method of doing it. I saw IF_WD_WINDOW_MANAGER=>CREATE_EXTERNAL_WINDOW, but it creates a popup. I want the user to be redirected to the BSP application, in the same window. I saw call method WDR_TASK=>RESPONSE->REDIRECT EXPORTING URL ='http://www.google.com' PERMANENTLY = 1. But this also doesn't work.

Please help me.

Thanks,

Juwin

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Oct 20, 2009 at 06:41 PM

    You can use a iFrame container to do this. Note that the support for iFrame was deprecated but it has been brought back in the latest version again.

    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/9b/0af941df152135e10000000a1550b0/frameset.htm

    Also, check this

    /people/guillaume.garcia/blog/2008/10/22/using-flex-in-sap-web-applications-without-adobe-flash-islands

    KK

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 21, 2009 at 04:15 AM

    Try this appraoch :

    Do the following steps :

    -> Make an Outbound Plug to the Window.

    ->Make the type of Outbound plug to Exit Type.

    ->Add URL of type String as a parameter to the outbound plug of Window.

    ->Do remember to add Component Name in the Properties Tab of View ( othervs Calling Outbound plug of window from view wont b possible ).

    To open a new URL with closing the previous one write this Code in OnAction of Button : ( this Code can be get from Code Wizard too ).

    DATA lo_zexit TYPE REF TO ig_zexit . <zexit is name of my Window>

    lo_zexit = wd_this->get_zexit_ctr( ).

    lo_zexit->fire_out_window_plg(

    url = 'http://www.google.com' " string

    ).

    SAP Online help :

    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/ca3351508f04e7e10000000a42189c/content.htm

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 21, 2009 at 06:01 AM

    hi Juwin ,

    create custom controller for ur view . windows exit plug is called by an event handler method in the controller of view.

    u can do it thru code wizard. Press CNTRL + F7 and selecting the radio button METHOD CALL IN USED CONTROLLER.

    regards,

    amit

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      what do u mean by Used Controller

      Used Controller is your component controller only.

      Basically we have View Controller , Component Controller and Custom Controller.

      For Calling Exit plug of Windows , we use Component Controller.

      Go to Code Wizard-> Method call in Used Controller -> Select your outbound plug.

      I hope I am clear in explaining you.

      So there is no need For Custom Controller as told by you in your earlier post.

  • avatar image
    Former Member
    Oct 21, 2009 at 07:42 AM

    When user tries to open my webdynpro application, it first checks if the user is logging on to the system for the first time

    How do u know the first time?

    When u went to BSP, the WDabap session might be closed.

    U should show ur BSP in IFRAME ui element, In order to session problems doesnt happens

    Volkan Bekci

    Add comment
    10|10000 characters needed characters exceeded