Application Logoff Page

If an application is closed by an Exit Plug, and no other application is started, the Web Dynpro Framework sends a standard logoff page to the browser. This is entered in the service node of the Web Dynpro (/default_host/sap/bc/webdynpro). The Web Dynpro node is the parent node of all Web Dynpro ABAP applications you create.

If you want to now use your own logoff page for your application, you can overwrite this standard page on the subnode of your application.

To do this go to the service node of your application and enter your own data under Error Pages  ®  Logoff Pages. You can enter your text on this screen or go to another page.

Closing the Browser Window After Application Closes

Along with being able to set up your own logoff page for a service node, you can also close the browser window using JavaScript on this logoff page.

How the JavaScript functions depends on the browser you are using.
You can find information about browsers for Web Dynpro ABAP supported by SAP under

If the window you want to close is not the last browser window, then the JavaScript function works in the Internet Explorer and in Netscape. If the window you want to close is the last window, when the JavaScript function is called a popup is sent to ask you if you really want to carry out this action. In Netscape the function is executed without a further prompt.



        function closeWindow( ){       

              top.close( );         




        <form>The application was successfully closed <br>

          <input type="button" value="close window" onclick="closeWindow( );" />




Deleting the Authentication in Logoff

When you log off from some applications, the authentication of the user may also have to be reset in the browser, which means that a new authentication is needed when the application is called again. If basic authentication is used for the logon, this information can only be deleted in the browser with Internet Explorer 6.0 SP1 and higher.

document.execCommand( 'ClearAuthenticationCache' );

If an SSO2 cookie is used for the authentication, you can delete the cookie with JavaScript:

function DelSso2Cookie(sName,sPath)


    var sso2Domain = location.hostname;

    if (location.hostname.indexOf(".")>0)

      sso2Domain = location.hostname.substr(location.hostname.indexOf(".")+1);


    if(sPath)p=" path="+sPath+";";

      document.cookie = sName+"=0; expires=Fri, 31 Dec 1999 23:59:59 GMT;"+p + "domain="+sso2Domain+";";


You can also include this JavaScript in logoff pages.


We strongly recommend that you do not delete the cookie. In particular, when the cookie is deleted from the portal, the logon to the portal is also deleted, and the user has to log on again.