cancel
Showing results for 
Search instead for 
Did you mean: 

Call a URL from Webdynpro, at INIT method

Juwin
Active Contributor
0 Kudos

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

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

hi,

create custom controller for ur view

Refer this SAP Online Help :

SAP Online help :

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

You dont need to create a Custom Controler to Exit the window.

You can call the exit plug inside view using Code Wizard - Call method in Used controller.

Edited by: Saurav Mago on Oct 21, 2009 12:01 PM

Former Member
0 Kudos

hi,

in reference to the SAP online help

In the following source code a windows exit plug is called by an event handler method in the controller of an embedded view, and it specifies an external URL.

I am taling about the Controller of ur view .

You dont need to create a Custom Controler to Exit the window.

You can call the exit plug inside view using Code Wizard - Call method in Used controller.

what do u mean by Used Controller , I am talking about the same !!

regards,

amit

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

kkram
Contributor
0 Kudos

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