<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic User-Exit for Logout in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-for-logout/m-p/1055835#M90335</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a user-exit (like FM SUSR_LOGON_USER_EXIT) that is executed each time a user logs out of the sap system?!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--MIKE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Oct 2005 16:32:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-10-31T16:32:18Z</dc:date>
    <item>
      <title>User-Exit for Logout</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-for-logout/m-p/1055835#M90335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a user-exit (like FM SUSR_LOGON_USER_EXIT) that is executed each time a user logs out of the sap system?!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--MIKE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2005 16:32:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-for-logout/m-p/1055835#M90335</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-31T16:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: User-Exit for Logout</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-for-logout/m-p/1055836#M90336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  No there is not, but we use a work-around that may help you.  In the log-on user exit that you reference, we store some information such as user-name, terminal, etc. from a function call to 'RFC_SYSTEM_INFO' in a custom table.  Then, we call the function BP_EVENT_RAISE to trigger a periodic background job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: wf_rfcsi TYPE rfcsi.
* Get the system information, which will include the computer name and
* the IP address of the logon.
  CALL FUNCTION 'RFC_SYSTEM_INFO' DESTINATION 'SAPGUI'
     IMPORTING
       rfcsi_export    = wf_rfcsi.
* Then, store the user name and IP address and terminal name in custom table.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  The background job then checks table usr41 with the information in that table to see if the user has logged off.  It is certainly not a perfect solution, but it works in our case because we are just trying to trap any super-user log ons (such as DDIC) so we can report the transactions that were executed (SOX) and then lock the user once the log-out occurs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&amp;lt;select data from custom table&amp;gt;
DO.
* Check tabe USR41 to see if this user has logged off the terminal.
    SELECT SINGLE *
             FROM usr41
             INTO *usr41
             WHERE bname = &amp;lt;username from table&amp;gt;
               AND terminal = &amp;lt;terminal name from table&amp;gt;.
    IF sy-subrc NE 0.
      EXIT.
    ELSE.
* Wait another minute if the user has not logged off.
      WAIT UP TO 60 SECONDS.
    ENDIF.
  ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2005 19:38:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-for-logout/m-p/1055836#M90336</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-31T19:38:52Z</dc:date>
    </item>
  </channel>
</rss>

