on 10-27-2009 2:01 PM
Hi all,
i wonder that i cannot find a logout method somewhere. I have read about an exit plug, but how to fire exitplug of a windwow from the view ?
And how to do a normal logout button which logs out the user and start the webdynpro application again and go to the login screen ?
Thx a lot
Roman
how to do a normal logout button which logs out the user and start the webdynpro application again and go to the login screen
For this , you can use the concept of Outbound and Inbound plugs.
1. On the button, first invalidate all the nodes using :
lo_nd->invalidate( ).
here lo_nd is the reference to the node. Just invalidate all the nodes.
2. Make outbound plug from your last view and inbound to the first view.
On the button action , after invalidating nodes, just fire the outbound plug and thus you will enter the first screen of your application.
I hope it is clear.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok thanks for the incredible fast answer....
I managed to fire the Exit plug, but this only close the application, the user logon session is still present, so if i start the webdynpro application again the last logged on user session will be taken and the normal Logon screen doesn't appear.
How to close the user session in the webdynpro application and redirect to the normal Netweaver Logon screen ?
Thanks a lot!
Hello Ronan,
This is not a solution from WD side but I hope this helps, What I have done in a similar case like this is Go To the Tools part and check the Delete Browsing History on Exit check box. Your cookies are stored hence when you try to login again It will automatically login using the login id that you have used previously. I'm not sure if it is possible to provide a log out button where it shows the Netweaver logon screen.
Thank You,
Sai
Ok i solved it by redirecting to a bsp page and inside this i kill the authentication cookies on the client side, after delete i redirect to the original webdynpro application which brings me again to the login page......
function DelSso2Cookie(sName,sPath){
var sso2Domain = location.hostname;
if (location.hostname.indexOf(".")!=0) sso2Domain =location.hostname.substr(location.hostname.indexOf(".")+1);
p="";
if(sPath)p=" path="+sPath+";";
document.cookie = sName+"=0; expires=Fri, 31 Dec 1999 23:59:59GMT;"+p+"domain="+sso2Domain+";";
};
try{document.execCommand( 'ClearAuthenticationCache' );
} catch (e) {}
DelSso2Cookie("MYSAPSSO2","/");
Hi Ronan,
I am using this functionality to close the window and kill the authentication cookie.
Upto this its working fine.
But when i try to acess the same application it is displaying a blank page.
Can you how do you redirect to the original webynpro application which wil bring me to the login page..
Code i am using:
l_ref_wdr_test_exit_plug = wd_this->get_ZDISPLAY_ctr( ).
l_ref_wdr_test_exit_plug->fire_O_main_exit_plg( CLOSE_WINDOW = 'X'
url = '/sap/bc/bsp/sap/system/logoff.html').
Best Regards,
navin fernandes.
how to fire exitplug of a windwow from the view ?
Use Exit Plug in Windows:
Do the following steps :
-> Make an Outbound Plug to the Window.
->Make the type of Outbound plug to Exit Type.
->Add CLOSE_WINDOW of type wdy_boolean 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 be possible ).
->Fire the outbound plug with close_window as X in the onAction of Exit Button .
Refer SAP online help on using Exit plug to close a window:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/ca3351508f04e7e10000000a42189c/content.htm
method ONACTIONGO_EXIT .
data: L_REF_MAIN_WINDOW type ref to IG_MAIN_WINDOW .
L_REF_MAIN_WINDOW = WD_THIS->GET_MAIN_WINDOW_CTR( ).
L_REF_MAIN_WINDOW->FIRE_MY_EXIT_PLUG_PLG( CLOSE_WINDOW = 'X' ).
endmethod.
here Main_window is the window which needs to be closed.
I hope it is clear.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.