<?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: log off from ABAP Program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/log-off-from-abap-program/m-p/8800752#M1680098</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Get list of modes&amp;nbsp; and delete specific modes are not easy, you will mostly require use of "&lt;STRONG style="color: #ff0000;"&gt;forbidden&lt;/STRONG&gt;" call system command like &lt;A href="http://search.sap.com/ui/scn#query=ThUsrInfo"&gt;ThUsrInfo&lt;/A&gt;.&lt;SPAN __jive_emoticon_name="devil" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.sap.com/797/images/emoticons/devil.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What if you want to try ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at include TSKHINCL for opcode values, perform some where-used on those constants, if unlucky you find SAP report using the system calls, if you are lucky the call is executed in a useful function module (name starting with TH_)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result could look like following samples,&amp;nbsp; informative only, neither tested nor intended to be tested...&lt;SPAN __jive_emoticon_name="wink" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.sap.com/797/images/emoticons/wink.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;DATA: tid TYPE utid,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; modes TYPE sy-index,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mode_list type table of modus with HEADER LINE,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; modus type modus.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;* Current session id (Look at TH_USER_INFO)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;CALL 'ThUsrInfo' ID 'OPCODE' FIELD opcode_usr_attr&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;&amp;nbsp; ID 'TID' FIELD tid. " Id of current session&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;* Number of modes (Look at form modus_liste of RSM04000_ALV)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;CALL 'ThUsrInfo' ID 'OPCODE' FIELD opcode_mode_count&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;&amp;nbsp; ID 'TID' FIELD tid&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;&amp;nbsp; ID 'MODES' FIELD modes. " number of modes&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;CHECK modes GT 1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;* List of modes with transaction (Look at TH_SELECT_MODE)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;*CALL 'ThUsrInfo' ID 'OPCODE' FIELD opcode_get_mode_list&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;*&amp;nbsp;&amp;nbsp;&amp;nbsp; ID 'TID' FIELD tid&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;*&amp;nbsp;&amp;nbsp;&amp;nbsp; ID 'MODE_LIST' FIELD&amp;nbsp; mode_list. " mode list&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;* &lt;/SPAN&gt;Delete a Mode (Look at TH_DELETE_MODE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; color: #0000ff;"&gt;CALL 'ThUsrInfo' ID 'OPCODE' FIELD opcode_delete_mode&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID 'MODE' FIELD mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Try in a sandbox...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: /nex is not an actual transaction, trying to enter in debug mode (even system) in what is probably a C program gives little chance of success...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Jun 2012 08:46:31 GMT</pubDate>
    <dc:creator>RaymondGiuseppi</dc:creator>
    <dc:date>2012-06-21T08:46:31Z</dc:date>
    <item>
      <title>log off from ABAP Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/log-off-from-abap-program/m-p/8800746#M1680092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I Wonder whether it is possible to write an abap program&lt;/P&gt;&lt;P&gt;which fulfills following requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just like the tcode which is used to log off /nex.&lt;/P&gt;&lt;P&gt;but it closes all sap windows without warning on the same server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what i want,&lt;/P&gt;&lt;P&gt;i want to write a progam and then create a tcode for that say &lt;STRONG&gt;zex.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;on entering that tcode the system close all sap window on the same server except one.&lt;/P&gt;&lt;P&gt;eg:&lt;/P&gt;&lt;P&gt;say i have opened 4 sessions of prd server. and i want to close 3 of them.&lt;/P&gt;&lt;P&gt;then i execute custom tcode say zex. and out of 4 --3 sessions will be closed.&lt;/P&gt;&lt;P&gt;no of sessions to be closed&amp;nbsp; = total no of open sessions - 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dont know whether it is possible&amp;gt;&lt;/P&gt;&lt;P&gt;ur suugesstions wanted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are FM present.&lt;/P&gt;&lt;P&gt;THUSRINFO&lt;/P&gt;&lt;P&gt;call 'syst_logoff'.&lt;/P&gt;&lt;P&gt;but none of them suits to my requirement.,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2012 11:31:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/log-off-from-abap-program/m-p/8800746#M1680092</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-19T11:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: log off from ABAP Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/log-off-from-abap-program/m-p/8800747#M1680093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is there no one to reply&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2012 06:14:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/log-off-from-abap-program/m-p/8800747#M1680093</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-21T06:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: log off from ABAP Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/log-off-from-abap-program/m-p/8800748#M1680094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhishek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well in that case the requirement isnt to logoff but to close all the open sessions except one. But how are you going to decide which session has to be open ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest to check FM's for closing a session or debug close session to identify how SAP does it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2012 06:22:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/log-off-from-abap-program/m-p/8800748#M1680094</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-21T06:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: log off from ABAP Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/log-off-from-abap-program/m-p/8800749#M1680095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The session which will remain open will be that opened at the begning.&lt;/P&gt;&lt;P&gt;say it other way:&lt;/P&gt;&lt;P&gt;at any open session at bottom right corner there displayed:&lt;/P&gt;&lt;P&gt;server name (session No ) client.&lt;/P&gt;&lt;P&gt;eg: dev(1)700.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;only session 1 will remain open and all other will be closed.&lt;/P&gt;&lt;P&gt;i tried to debug.&lt;/P&gt;&lt;P&gt;first /h in command box.&lt;/P&gt;&lt;P&gt;and then tcode /nex. but it does not goes in debugging mode rather it exits sap.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2012 06:37:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/log-off-from-abap-program/m-p/8800749#M1680095</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-21T06:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: log off from ABAP Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/log-off-from-abap-program/m-p/8800750#M1680096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhishek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to switch on System Debugging.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2012 06:45:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/log-off-from-abap-program/m-p/8800750#M1680096</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-21T06:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: log off from ABAP Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/log-off-from-abap-program/m-p/8800751#M1680097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;lt;&amp;lt; Content Removed &amp;gt;&amp;gt;&lt;/SPAN&gt; i first switch on system debugging and then entered tcode /nex. but that is what i am saying instead on entering into debugging mode it directly exits.&lt;/P&gt;&lt;P&gt;all sap sessions closed!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;lt;&amp;lt; Moderator Message : Speak professionally in the forums &amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Kesavadas Thekkillath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2012 07:09:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/log-off-from-abap-program/m-p/8800751#M1680097</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-21T07:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: log off from ABAP Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/log-off-from-abap-program/m-p/8800752#M1680098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Get list of modes&amp;nbsp; and delete specific modes are not easy, you will mostly require use of "&lt;STRONG style="color: #ff0000;"&gt;forbidden&lt;/STRONG&gt;" call system command like &lt;A href="http://search.sap.com/ui/scn#query=ThUsrInfo"&gt;ThUsrInfo&lt;/A&gt;.&lt;SPAN __jive_emoticon_name="devil" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.sap.com/797/images/emoticons/devil.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What if you want to try ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at include TSKHINCL for opcode values, perform some where-used on those constants, if unlucky you find SAP report using the system calls, if you are lucky the call is executed in a useful function module (name starting with TH_)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result could look like following samples,&amp;nbsp; informative only, neither tested nor intended to be tested...&lt;SPAN __jive_emoticon_name="wink" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.sap.com/797/images/emoticons/wink.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;DATA: tid TYPE utid,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; modes TYPE sy-index,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mode_list type table of modus with HEADER LINE,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; modus type modus.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;* Current session id (Look at TH_USER_INFO)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;CALL 'ThUsrInfo' ID 'OPCODE' FIELD opcode_usr_attr&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;&amp;nbsp; ID 'TID' FIELD tid. " Id of current session&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;* Number of modes (Look at form modus_liste of RSM04000_ALV)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;CALL 'ThUsrInfo' ID 'OPCODE' FIELD opcode_mode_count&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;&amp;nbsp; ID 'TID' FIELD tid&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;&amp;nbsp; ID 'MODES' FIELD modes. " number of modes&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;CHECK modes GT 1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;* List of modes with transaction (Look at TH_SELECT_MODE)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;*CALL 'ThUsrInfo' ID 'OPCODE' FIELD opcode_get_mode_list&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;*&amp;nbsp;&amp;nbsp;&amp;nbsp; ID 'TID' FIELD tid&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;*&amp;nbsp;&amp;nbsp;&amp;nbsp; ID 'MODE_LIST' FIELD&amp;nbsp; mode_list. " mode list&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;* &lt;/SPAN&gt;Delete a Mode (Look at TH_DELETE_MODE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; color: #0000ff;"&gt;CALL 'ThUsrInfo' ID 'OPCODE' FIELD opcode_delete_mode&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID 'MODE' FIELD mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Try in a sandbox...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: /nex is not an actual transaction, trying to enter in debug mode (even system) in what is probably a C program gives little chance of success...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2012 08:46:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/log-off-from-abap-program/m-p/8800752#M1680098</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2012-06-21T08:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: log off from ABAP Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/log-off-from-abap-program/m-p/8800753#M1680099</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;Did you have a look @ FM TH_DELETE_USER. Unfortunately I could not confirm it on my system because of 'Authority' issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raju chitale&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2012 04:28:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/log-off-from-abap-program/m-p/8800753#M1680099</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-22T04:28:47Z</dc:date>
    </item>
  </channel>
</rss>

