cancel
Showing results for 
Search instead for 
Did you mean: 

Logout button in WebDynpro

Former Member
0 Kudos

Experts,

Can you tell me how to put a logoff button funcatioality in a webdynpro application? The issue is that I dont have an enterprise portal and my application is being deployed on WAS directly. so i need to have the loggoff button explicitly in my application.

Regards,

Shobhit

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Shobhit,

1. Put LinkToAction UI control on view, set it text to "Log off"

2. Create LogOff action and assign it to onAction event of LinkToAction control created in [1]

3. In LogOff action handler write


com.sap.tc.webdynpro.services.sal.um.api.WDClientUser.forceLogoffClientUser(null);

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

HI Valery,

Your solution worked. Thanks. Where can I change the logoff.htm file to give a different message?

Regards,

Shobhit

Former Member
0 Kudos

Shobhit,

See reply to this thread:

-- Open properties of WD application in NW IDE

-- Edit predefined property sap.logoffURL

-- Type whatever URL you need

(no code changes necessary)

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

Hi Valery,

You pointed to this thread itself!!

But thanks you solved my problem!!

Regards,

Shobhit

Answers (3)

Answers (3)

Former Member
0 Kudos

hi

good

go through this link,which might be help you to solve your problem

http://help.sap.com/saphelp_erp2005/helpdata/en/fc/04a5421935c511e10000000a1550b0/content.htm

thanks

mrutyun^

Former Member
0 Kudos

HI

METHOD 1

1) In your Interface view, create an exit plug with a parameter Url of type string.

2) Add your Interface view controller to your current view's required controller. (in properties tab of your view)

3) After opening the new External window fire the outbound plug as :

wdThis.wdGet<your interface view controller>().wdFirePlug<your exit plug's name>("javascript:void(window.close())");

METHOD 2

1)WDClientUser.forceLogoffClientUser(url);

(url here cane be blank html page which closes itself onLoad or any other webpage you want )

for eg. WDClientUser.forceLogoffClientUser(close.html);

or WDClientUser.forceLogoffClientUser(www.sn.sap.com); etc

Former Member
0 Kudos

hi virag

There is no need for any kind of arguments like this "javascript:void(window.close())" in outbound exit plug of interface view.

Just create sap.logoffURL application parameter from predefined option and give your logoff url for that parameter.

regds

Former Member
0 Kudos

Hi,

To end a Web Dynpro application from within the application itself, the system must call the outbound plug of the interface view of the root component. The outbound plug must be of the type Exit Plug.

By default, the user is then routed to the page defined in logoff.htm. For the outbound plug, you can define a different page to which the user is directed using the parameter Url.

regds