Kill user's session via ABAP (like in SM04)

Does anybody knows is it possible to kill user's session via ABAP? Not all session like via  TH_DELETE_USER, but selectively, session by session.
Maybe someone know how to trace which logic works when we press "Close session" button in SM04?

Hi Michael,
below a snippet to retrieve the sessions and a way to delete a TID.
Maybe it come in handy for your requirement.
Best,
Sander
INCLUDE tskhincl.
   DATA lt_userlist TYPE STANDARD TABLE OF uinfo.
   DATA ls_userlist TYPE uinfo.
CALL 'ThUsrInfo' ID 'OPCODE' FIELD opcode_list
         ID 'TABUSR' FIELD lt_userlist .
CALL 'ThUsrInfo' ID 'OPCODE' FIELD opcode_delete_usr
     ID 'TID' FIELD ls_userlist-tid.

Similar Messages

  • Determine if it is a telnet session via ABAP

    Is there a way in ABAP to determine if the user is logged in through a telnet session?
    I want to ignore a command to run an ALV GRID if the user is logged in througha telnet session because the ALV GRID causes an error for telnet.
    Thanks,
    Matt

    Instead of determining if the user is coming in via telnet, lets determine if the SAPgui is present, and if it is, then only show the ALV. You can use this function module .
    DATA: lv_result TYPE c.
    CALL FUNCTION 'GUI_IS_AVAILABLE'
      IMPORTING
        return = lv_result.
    IF lv_result = 'X'.
    * Gui is present!!!
    ENDIF.
    Regards,
    Rich Heilman

  • Killing ODI Users Disconnected sessions

    Hi,
    We are accessing ODI via Citrix. More often then not some of the users simply close the application without disconnecting from the repository. This leads to performance degradation as there are many sessions which are not disconnected.
    How do I kill those sessions?
    Please suggest.
    Regards,
    Prerna

    Hi Prema,
    I think you can kill user session ffrom backend. Below URl may helps you
    http://www.dba-oracle.com/t_alter_system_kill_session.htm
    Hope it will helps you
    If you want to kill ODI execution session( I mean like user executed any scenario or package or interface or procedure from ODI), go to Operator >right click on execution session > click stop normal or stop immediate
    Regards,
    Phanikanth

  • How do I received the filled out form via email? After the user hits SUBMIT, I'd like to receive the filled out form via email.

    How do I received the filled out form via email? After the user hits SUBMIT, I'd like to receive the filled out form via email.

    Formscentral doesn't support direct delivery of filled forms via email at this time. You can however use Acrobat to add an email link to a form instead of a submit button. In this way the PDF will be returned to the email of your choice.
    Andrew

  • How to kill particular Oracle Session from the multiple Session of User

    Hi,
    I am working on Web Application using ASP.NET , C# with Oracle. I am excuting queries from multiple connection of same user. I want to kill particular user session. I have tried to Kill session by using ALTER SYSTEM KILL SESSION 'sid,serial#' it is working fine but how can i identify which session is generated by particular connection so that i can kill that particular session.
    Suppose there us user 'abc' there are multple instance of this user and all are active but same USERNAME. So Please tell me how can i identify that session through which i am executing the query.
    Thanks,
    Nitin

    Some ideas for how to pick the right session:
    -Look at the time the session was connected (logon_time)
    -Look at the time the session last started it's most recent statement (last_call_et)
    -Look at the sql that the session is running (join with sql_address and sql_hash_value over to v$sqltext_with_newlines or one of the other views that show you the sql they are running)
    That usually gets me most of the way, if it's possible to distinguish them. ("Yeah I just started this query and I want you to kill it." is different than "I started five different queries at about the same time and I'm not sure which one I need killed.")

  • Kill User Sessions in Enterprise

    I was told that there was some code here that would allow me to kill user sessions in BOE XI 3.1 SP3. Can anyone point me in the right direction?

    If you have access to Service Market Place, you can search for KB 1468652. 
    It includes the following information, the code snippets are java code, you will just need to convert it to .NET:
    This method was not supported in version XI R2, but it is supported in version XI 3.1.  The steps are:
    1. Retrieve the connection objects using the following query and determine the SI_ID of the connection you want to terminate.
    SELECT SI_ID, SI_USERID, SI_NAME, SI_LASTLOGONTIME FROM CI_SYSTEMOBJECTS WHERE SI_KIND = 'Connection' AND SI_FAILOVER_AVAILABLE_UNTIL = NULL AND SI_AUTHEN_METHOD != 'server-token' ORDER BY SI_NAME"
    Do not delete any connections that use the server-token authentication method as those are used to communicate between servers (e.g. between the page server and cache server).
    2. Once you know the SI_ID, retrieve that specific infoobject and delete it.
    IInfoObjects oSessions = (IInfoObjects) iStore.query("SELECT SI_ID from CI_SYSTEMOBJECTS WHERE SI_ID =" + sessionID);
    IInfoObject oSession = (IInfoObject)oSessions.get(0);
    oSessions.delete(oSession);
    iStore.commit (oSessions);

  • Killing user session & and update v$session

    i use
    alter system kill session 'sid,serial#) immediate.
    user session killed but not clean, V$session show that user connect
    i also want clean user session and remove form V$session
    Any one who can do this ...
    Thanks

    Hi,
    >>how remove on killing user session
    As I said before, you just need to wait ... Don't worry about. On the other hand, by finding the SPID, you can force the process to be killed instead of waiting for PMON to wake up and kill it, but I think that it is not necessary.
    Cheers
    Legatti

  • Killing User Sessions upon closing window

    How can we kill the user session people if people just go in
    and close the window by hitting x on the top of the browser? Any
    feedback and help would be greatly appreciated.

    Technically, you can't kill a user's session upon them
    closing the window.
    What you _can_ do is use J2EE session tracking, or a
    transient cookie that gets deleted when the browser quits. That
    still doesn't kill the session when they close the window. The
    session remains active until the timeout time has elapsed.

  • App-V 5.0 SP2 user applications published via SCCM 2012 to VDI workstations with roaming only

    Hi,
    The environment consists of App-V 5.0 SP2 (KB2956985) user based applications published via SCCM 2012 to Windows 7 VDI snapshotted workstations that are reset at user logoff.
    When a user logs on the SCCM 2012 client initiates App-V client package publishing.  After a couple of minutes after logon the shortcuts appear and the user can launch their applications.
    The issue is that at logoff, even with roaming enabled, the publishing information disappears.  This causes the next logon process for that user to repeat, the applications are not available until the SCCM client has completed it's publishing cycle. 
    Roaming profiles are implemented. %APPDATA% is redirected to a UNC path.  The following registry key is set
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AppV\Client\Integration\PreserveUserIntegrationsOnLogin=1
    U-EV, global publishing of applications, and AppLocker rules are not an option.  Also, I have read this already - http://technet.microsoft.com/en-us/library/dn659478.aspx#BKMK_PE
    I do not want to wait for the SCCM client to kick in prior to the user applications being available.  What do I need to roam or run to create a seamless transition for the user between sessions? 
    Eddie.

    Hi Tywin (bad username considering the last GoT Episode ;))
    If you ask Microsoft, they always recommend using SCCM for deploying App-V packages and reuse your current SCCM infrastructure if that is already in place. Problem is, as you now experience, is that there is some big caveats both in regards to publishing
    time and to roaming of settings.
    As Nické states I would suggest looking into the Full Infrastructure Model for App-V 5.x, which gives you much better performance in what I call "from no apps" to "being able to click the shortcut" - the add and publishing phase. If you don't have the time/budget/whatever
    to start looking into that, you could look into some community tools like App-V Scheduler which is developed specific by Citrix guys to ease the publishing and management in a Citrix world.
    Microsoft have a great article about Performance Guidelines, which you have read, but it mostly presumes you work with Full Infrastructure. Have you looked into Steve Thomas' session from TechEd NA? It talks about "implementation trends".
    Senior Consultant at Atea Denmark - http://Atea.dk Atea Technical Evangelist for App-V NoLightPeople - http://NoLightPeople.com Access Director - http://www.nolightpeople.com/index.aspx#accessdirector

  • Routing a Portal user to a designated ABAP instance

    Hi experts,
    my concern is about performance testing in a portal landscape which is connected to several ABAP systems and a Producer Portal.
    Because functional and performance testing will temporarily overlap, we consider to route our Mercury test users to a designated ABAP/Producer Portal instance in order to separate the load from funtional testing.
    My question:
    How can I ensure that the mercury test users get linked to the second ABAP instance/Producer Portal instance?
    First ideas:
    - Does it help to assign the test users to a specific user group which could be evaluated during SSO?
    - Use of ABAP Logon groups without changing the System Object in the Portal;
    - Taking advantage of the Load Balancer configuration.
    Many thanks in advance and best regards,
    Martin

    The nice thing about loadrunner and other such products is also a headache... and that is handling the headers correctly. In the HTTP header you can set the load balance and session cookies to force the session to a particular place via a web dispatcher.
    You need also to be aware RFC's from the Portal to the ABAP and these should use a logon group that you can force to the instance you desire.
    It is also possible if going via a web dispatcher to hard code the web dispatcher to only have a single system.
    In essence there are a few ways

  • Routing a Portal User to a designated ABAP/Portal Instance

    Hi experts,
    my concern is about performance testing in a portal landscape which is connected to several ABAP systems and a Producer Portal.
    Because functional and performance testing will temporarily overlap, we consider to route our Mercury test users to a designated ABAP/Producer Portal instance in order to separate the load from funtional testing.
    My question:
    How can I ensure that the mercury test users get linked to the second ABAP instance/Producer Portal instance?
    First ideas:
    - Does it help to assign the test users to a specific user group which could be evaluated during SSO?
    - Use of ABAP Logon groups without changing the System Object in the Portal;
    - Taking advantage of the Load Balancer configuration.
    Many thanks in advance and best regards,
    Martin

    The nice thing about loadrunner and other such products is also a headache... and that is handling the headers correctly. In the HTTP header you can set the load balance and session cookies to force the session to a particular place via a web dispatcher.
    You need also to be aware RFC's from the Portal to the ABAP and these should use a logon group that you can force to the instance you desire.
    It is also possible if going via a web dispatcher to hard code the web dispatcher to only have a single system.
    In essence there are a few ways

  • E-mailing Job Spool via ABAP - extra confirm message???

    Hello,
    I have coded ABAP program that creates background job with spool recipients. The spool is than sent over internet to specified address. What I also get another confirmation e-mail that the spool to sent, and I am not sure how to get rid of it. 
    Would anybody know how to do it?
    Thanks,
    Alex
    Below is my code:
    data: JOB_NAME         LIKE TBTCO-JOBNAME,
            JOB_NR           LIKE TBTCO-JOBCOUNT,
            PARAMS           LIKE PRI_PARAMS,
            VALID            TYPE C,
            JOB_RELEASED     TYPE C,
            u_email          like adr6-smtp_addr.
      DATA RECIPIENT TYPE SWC_OBJECT.
      DATA RECIPIENT_OBJ LIKE SWOTOBJID.
      SWC_CONTAINER CONTAINER.
      clear u_email.
      SELECT SINGLE adr6~smtp_addr INTO u_email FROM adr6
          INNER JOIN usr21
          ON usr21persnumber = adr6persnumber
          AND usr21addrnumber = adr6addrnumber
          WHERE usr21~bname = sy-uname.
    Generate an object reference to a recipient object
      SWC_CREATE_OBJECT RECIPIENT 'RECIPIENT' SPACE.
    Write the import parameters for method
    recipient.createaddress into the container
    and empty the container
      SWC_CLEAR_CONTAINER CONTAINER.
    Set address element (internal user 'JSMITH')
      SWC_SET_ELEMENT CONTAINER 'AddressString' u_email.
    Set address type (external address)
      SWC_SET_ELEMENT CONTAINER 'TypeId' 'U'.
    Call the method recipient.createaddress
      SWC_CALL_METHOD RECIPIENT 'CreateAddress' CONTAINER.
    Issue any error message generated by a method exception
      IF SY-SUBRC NE 0.
        WRITE:/ 'ERROR: Address can not be created'.
        EXIT.
      ENDIF.
      SWC_CALL_METHOD RECIPIENT 'Save' CONTAINER.
      SWC_OBJECT_TO_PERSISTENT RECIPIENT RECIPIENT_OBJ.
    Recipient has been generated and is ready for use in a
    background job
      JOB_NAME  = 'Z10_TEST123'.
    *open the background job and get a job number
      CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          JOBNAME          = JOB_NAME
        IMPORTING
          JOBCOUNT         = JOB_NR
        EXCEPTIONS
          CANT_CREATE_JOB  = 1
          INVALID_JOB_DATA = 2
          JOBNAME_MISSING  = 3
          OTHERS           = 4.
      IF SY-SUBRC NE 0.
        WRITE:/ 'ERROR: Background job can not be created'.
        EXIT.
      ELSE.
    *submit job with all the selection screen params...
        SUBMIT Z_TEST_SPOOL
              WITH SALENUM = SALENUM
              WITH sp_eml  = ' '
              USER SY-UNAME
              VIA JOB JOB_NAME NUMBER JOB_NR
              TO SAP-SPOOL
              WITHOUT SPOOL DYNPRO
              AND RETURN.
        IF SY-SUBRC NE 0.
          WRITE:/ 'ERROR: Background job can not be submited'.
          exit.
        ENDIF.
        CALL FUNCTION 'JOB_CLOSE'
          EXPORTING
            JOBCOUNT             = JOB_NR
            JOBNAME              = JOB_NAME
            STRTIMMED            = 'X'    " start immediatly
            RECIPIENT_OBJ        = RECIPIENT_OBJ
          IMPORTING
            JOB_WAS_RELEASED     = JOB_RELEASED
          EXCEPTIONS
            CANT_START_IMMEDIATE = 1
            INVALID_STARTDATE    = 2
            JOBNAME_MISSING      = 3
            JOB_CLOSE_FAILED     = 4
            JOB_NOSTEPS          = 5
            JOB_NOTEX            = 6
            LOCK_FAILED          = 7
            OTHERS               = 8.
        IF SYST-SUBRC <> 0.
          WRITE:/ 'ERROR: Background job can not be closed'.
          exit.
        ENDIF.
      ENDIF.

    Try adding
      swc_clear_container container.     
      swc_set_element container
                      'Deliver'
                      space.
      swc_call_method recipient  
                      'SetDeliver'
                      container.
    above SWC_CALL_METHOD RECIPIENT 'Save' CONTAINER in ur code.
    <b>Correction:</b> Mentioned wrong method in the above code, Please change 'Deliver' and 'SetDeliver' with 'StatusInfoByMail' and 'SetStatusInfoByMail' respectively.
    Regards
    Sridhar
    Message was edited by: Sridhar K

  • Killing Duplicate database session

    Hi
    We are running an Oracle 8i database. Remote users logon onto the database. The line drops and they lose connection. When the line is up again, they reconect successfully. However, there are now two sessions for this user. What can I do to identify the older session on the database for users and kill the older session.
    Thanks

    alter system kill session 'sid,serial#';
    alter system kill session '243,14563'; -- USE THIS
    -- find the session from V$session table and kill the session using SID and SERIAL
    -- check the logon_time to find the older sessions
    select sid,serial#,username,terminal,osuser,program,type,status,last_call_et,logon_time
    from V$session
    where type = 'USER'and username not like '%SYS%';
    Hope this will help.
    Regards
    Asif Kabir

  • How do I get the Username of an AnyConnect VPN session via SNMP?

    I would like to monitor the usernames of my AnyConnect sessions via SNMP.  This will allow me to monitor, graph, report, and alert using Solarwinds Orion (or any other SNMP software).
    I would like to monitor this on my ASA 5520. I have run the show snmp-server oidlist command and I can see all of the OID's that I can poll. However, the OID I would like to poll crasUsername (1.3.6.1.4.1.9.9.392.1.3.21.1.1) is not working.
    Does anyone know how I can monitor the username of a AnyConnect session via SNMP?
    Below is a link to a great MIB reference for ASA Remote Access Monitor OID list.
    http://www.mibdepot.com/cgi-bin/getmib3.cgi?i=1&n=CISCO-REMOTE-ACCESS-MONITOR-MIB&r=cisco&f=CISCO-REMOTE-ACCESS-MONITOR-MIB.my&v=v2&t=tree

    Hello PDX,
    Welcome to the HP Support Forums!
    To get your issue more exposure I would suggest posting it in the commercial forums since this is a commercial product. You can do this at Commercial Forums.
    Regards,
    JERENDS
    I work on behalf of HP
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to the left of the reply button to say “Thanks” for helping!

  • Push data from BW 3.5 to XI 3.0 via ABAP proxy

    Hi,
      I have the following scenario: I´m in BW 3.5 trying to send data to XI 3.0 via ABAP proxy. I´ve already found a "How-to" to do build this scenario, but something does not work. I think that problem is when a try do the logon from BW to XI because I got the message "logon data not provided" on http service in XI. I´ve already configure an RFC Destination(SM59) as R/3 connection(type 3) and another as HTTP connection to R/3(type H) and both are correct. Someone knows where I configure the user/pass to logon from BW Intergration Server to XI Integration Server?
    Regards,
    Rafael Soares

    Hello fellows!
       I discovered that my problem was configuration on SXMB_ADM transaction.
       Thank you very much for your help!
    Best regards.
    Rafael

Maybe you are looking for

  • How can i configure advance payment to vendors through cash jounal

    how can i configure advance payment to vendors through cash jounal pls its urgent for me kindly help me out

  • How to make weather widget appear in Notification Center?

    I've set up various apps for notification center.  I can now see notificatoins for emails, etc. that come in after my iphone is locked.  however, how or where do the weather and stock widgets show?  They are turned on, but not showing on the lock scr

  • Scans are not viewing properly

    The pics & doc scans on an HP All In One are not viewing properly after saving in the folders, they do view properly in the HP scan app though Is this a Mavericks issue

  • Gallery and chat

    A few of my friends are traveling to another country so though it would be a neat project to design a photo gallery and a chat program on the web that we can use to keep in touch. the small problem is i don't know fully where to start the project. I

  • Comparing of 2 dates

    can anyone tell me how to compare 2 dates? i have today's date and the delivery date of stock. the delivery date has to be equal to greater than today's date. if it is less than today's date, then the program must show an error while saving the progr