<?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 Re: End A User Session via ABAP Program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/end-a-user-session-via-abap-program/m-p/3473896#M835010</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to Transaction SM04.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select the user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And click END SESSION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Mar 2008 05:01:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-11T05:01:54Z</dc:date>
    <item>
      <title>End A User Session via ABAP Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/end-a-user-session-via-abap-program/m-p/3473893#M835007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All. Does anybody know how to end/terminate a specific user&amp;#146;s session? Say for example, a user has 3 sessions: MM01, SE16, and SM37. I would like to end/terminate, using a program, just the MM01 session leaving the other 2 sessions active.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RV&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2008 20:22:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/end-a-user-session-via-abap-program/m-p/3473893#M835007</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-10T20:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: End A User Session via ABAP Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/end-a-user-session-via-abap-program/m-p/3473894#M835008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rellie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       Have you given a thought of using the standard program &lt;STRONG&gt;'RSM04000_ALV'&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;That program displays all the users currently logged-in and the transactions they are working on.&lt;/P&gt;&lt;P&gt;It got many implicit enhancement points. So, for your purpose you can plug in your code in&lt;/P&gt;&lt;P&gt;those enhancement points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have not done anything similar but my guess is, it will work for this scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to plug your code in perform &lt;STRONG&gt;build_list&lt;/STRONG&gt; and complete user details will be available in the &lt;/P&gt;&lt;P&gt;table 'usr_tabl_alv'. This perform has got enhancement point so make use of it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me if it works for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Jallu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 04:53:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/end-a-user-session-via-abap-program/m-p/3473894#M835008</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T04:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: End A User Session via ABAP Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/end-a-user-session-via-abap-program/m-p/3473895#M835009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is a command LOGOFF in abap if u execute that command u can logged out of the current user session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or else call the function module CALL 'SYST_LOGOFF'. &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;example:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA : ANS.                                                                         
CALL FUNCTION 'POPUP_TO_CONFIRM'                                                   
     EXPORTING                                                                     
         TITLEBAR              = 'Do you really want to log off? '                 
*         DIAGNOSE_OBJECT       = ' '                                               
          TEXT_QUESTION         =                                                   
'Do you really want to log off and go home?'                                       
        TEXT_BUTTON_1         = 'Go Home'                                           
*         ICON_BUTTON_1         = ' '                                               
         TEXT_BUTTON_2         = 'Continue Working'                                 
*         ICON_BUTTON_2         = ' '                                               
*         DEFAULT_BUTTON        = '2'                                               
         DISPLAY_CANCEL_BUTTON = SPACE                                             
*         USERDEFINED_F1_HELP   = ' '                                               
         START_COLUMN          = 25                                                 
         START_ROW             = 6                                                 
*         POPUP_TYPE            =                                                   
    IMPORTING                                                                                
ANSWER                = ANS                                               
*    TABLES                                                                         
*         PARAMETER             =                                                   
     EXCEPTIONS                                                                                
TEXT_NOT_FOUND        = 1                                                 
          OTHERS                = 2.                                               
CHECK ANS = '1'.       
CALL 'SYST_LOGOFF'.   

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;bharat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 04:54:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/end-a-user-session-via-abap-program/m-p/3473895#M835009</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T04:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: End A User Session via ABAP Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/end-a-user-session-via-abap-program/m-p/3473896#M835010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to Transaction SM04.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select the user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And click END SESSION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 05:01:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/end-a-user-session-via-abap-program/m-p/3473896#M835010</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T05:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: End A User Session via ABAP Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/end-a-user-session-via-abap-program/m-p/3473897#M835011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all for your prompt replies!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello Akshay &amp;#150; yes, SM04 will definitely work if you&amp;#146;re doing it manually. I would like to do what SM04 can do, in terminating specific sessions, but I want to do it in a program and run the program in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello Bharat &amp;#150;what you suggested will work but I don&amp;#146;t want to logoff the user. I just want to terminate one of the user&amp;#146;s session. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello Jalendhar &amp;#150; you&amp;#146;re right 'RSM04000_ALV' is the place to start. That&amp;#146;s where I found out that I can use a function call to 'ThUsrInfo' that will give me a list of the active users in the system with all the sessions and transactions they are using. When I tried to debug (in system mode) the part that terminates the session, it doesn&amp;#146;t show me the exact code that does the termination. Through further research, I found that I can use 'ThUsrInfo' with &amp;#147;ID 'OPCODE' FIELD opcode_delete_mode&amp;#148; to delete a session. My problem is I can&amp;#146;t seem to figure out how to control which session gets terminated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody have an idea how to use 'ThUsrInfo' to terminate specific sessions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;RV&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 17:56:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/end-a-user-session-via-abap-program/m-p/3473897#M835011</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T17:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: End A User Session via ABAP Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/end-a-user-session-via-abap-program/m-p/3473898#M835012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the 'TH_DELETE_MODE' function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jul 2009 08:52:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/end-a-user-session-via-abap-program/m-p/3473898#M835012</guid>
      <dc:creator>former_member338933</dc:creator>
      <dc:date>2009-07-19T08:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: End A User Session via ABAP Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/end-a-user-session-via-abap-program/m-p/3473899#M835013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try SM12 also..and remove the lock..TCODe automatically will be removed...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jul 2009 08:55:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/end-a-user-session-via-abap-program/m-p/3473899#M835013</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-19T08:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: End A User Session via ABAP Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/end-a-user-session-via-abap-program/m-p/3473900#M835014</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;I have the same problem. Please, tell me, if you have success in this part&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Aug 2010 09:40:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/end-a-user-session-via-abap-program/m-p/3473900#M835014</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-30T09:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: End A User Session via ABAP Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/end-a-user-session-via-abap-program/m-p/3473901#M835015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi RV,&lt;/P&gt;&lt;P&gt;       Did you get the solution, I have the same issue where I want to delete a particular session. i tried using Th_USER_LIST , but it doesnt give me the list of all the sessions for a user.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Oct 2010 09:34:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/end-a-user-session-via-abap-program/m-p/3473901#M835015</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-15T09:34:13Z</dc:date>
    </item>
  </channel>
</rss>

