cancel
Showing results for 
Search instead for 
Did you mean: 

How to add Custom Button in Standared WebDynpro to close the session log off

0 Kudos

Hi Expert,

Could you please advice me how to add a custom button in a standard WebDynpro applications that will enable me to log off from the complete session.

Kindly let me know how to achieve the same.

Regards,

Jayesh

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi,

First enhance your Web Dynpro View by clicking on the enhance button (spiral button) and create a button. Now in OnAction of button Fire Exit Plug.

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

Check this link for enhancing WDA:  http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/700317da-bd79-2c10-368e-8f18bf5d8...

And this for Using Exit Plug: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0018077-f0c9-2b10-87af-eb9bb4077...

Hope this helps u.,

Regards,

Kiran

0 Kudos

Hi Kiran,

Last link will clear the session.

I want session log off when i click again it should ask for username and pwd.

Please suggest me.

Regards,

Jayesh

Former Member
0 Kudos

Hi Jayesh,

I had the similar requirement. What I did is I used the simple  BSP for log off.

Step 1) :FOr the logoff button fire the exit plug like this

DATA lo_w_main TYPE REF TO ig_w_main .

   lo_w_main =   wd_this->get_w_main_ctr( ).

     lo_w_main->fire_exit_app_plg( URL = '/sap/bc/bsp/sap/zsnr_logoff/logoff.htm' )--->this is the simple BSP which I created.

Step2) In BSP call your webdynpro application again..

In BSP Use the following Code its just a simple page..

<%@page language="javascript"%>

<html>

<script language="JavaScript">

// Delete the cookie with the specified name.

document.execCommand( 'ClearAuthenticationCache' );

</script>

<META HTTP-EQUIV=Refresh CONTENT="0; URL=/sap/bc/webdynpro/sap/zsnr_order_maintain">---->In this place call your webdynpro application which will ask the credentials again...

Logging off...

</BODY>

</html>

And it will work only in Internet explorer

Thanks

Former Member
0 Kudos

Hi Jayesh,

Did you follow my solution for the fix or you fixed on your own?

thanks

0 Kudos

Dear Sukumar,

First thanks for giving very good information.

I did through java script code to close the  internet explorer .

Regards,

Jayesh

Answers (0)