How to Terminate the Session of Running program from other program

I need to Terminate the session of the user using a particular program by running a other z program.

Use the function module TH_DELETE_USER.
Welcome to SDN.  Please remember to award points for helpful answers.  Thanks.
Regards,
Rich Heilman

Similar Messages

  • How to find the value of a variable in other program

    How to find the value of a variable in other program say I am in a FM and this FM is being called in from other program and I want to know some of the variable details of the program from the FM itself. Imagine if this is a txn. and I need to know the details from some of the programs while executing the same transaction
    Regards
    Vin

    Hi Vinayak,
         you will be having your first program values in internal table or some variables,
        when you are calling the second program you wii use like this,
        SUBMIT <Second Program Name> USING SELECTION-SCREEN '1000'
                           WITH s_emp(second program select-options)   IN t_emp(first program variables)
                           WITH p_chk   EQ t_chk
                           WITH p_r1    EQ t_r1
                           WITH p_month EQ t_month
                           WITH s_cust1 IN t_cust1
                           WITH p_r2    EQ t_r2
                           WITH s_cust2 IN t_cust2
                           WITH s_week  IN t_week
                           AND RETURN.
    you have pas like this to get your first program details.

  • How to Terminate the session of a user who is currently editing a program??

    Hi Folks!
    I have a question. If there are no of users working on SAP netweaver system with same username and password. If a user is currently editing a program. How to terminate that session so that can re-edit the same program??
    Thanks for your help.

    Via SM04 or logout yourself and login again. On pop-up window mark correct checkbox.

  • How to delete the all records in Ztable from report program

    Hi Guys,
    Good Day!
    How to delete all records in Ztable from report program(Means I want to clean Ztable records from report program) .  Please send me the code.
    Thanks & Regards,
    Reddy

    Use this.
    DELETE { {FROM target [WHERE sql_cond]}
           | {target FROM source} }.
    *But before deleting the rows please check if this Ztable is being used in any other programs or used by others.
    Check "where-used-list"
    in se11 give the table name
    utilities- where-used list.
    I hope this helps.
    thanks.

  • How to store Connection object and call it from other programs.

    Hi,
    I am trying to connect to the database, store the connection object and use this connection object from other standalone java programs.
    Can any one tell me how to do this? I've tried in the following way:
    In the following program I am connecting to the database and saving the connection object in a variable.
    public class GetKT2Connection {
       public static void main(String[] args) {
          String url = "jdbc:odbc:SQLDsn;
          String dbUser = "sa";
          String dbPwd = "sa";
          Connection kt2conn = Connection connection = java.sql.DriverManager.getConnection(url, dbUser, dbPwd);
          if(kt2conn == null) {
             System.out.println("Database Connection Failure!");
          else {
             System.out.println("Connected to Database...");
         GetKTConnectionObj.storeKT2ConnectionObj(kt2conn);
    } Here is the program to save connection object in a variable.
    public class GetKTConnectionObj {
       static Connection kt2Connection = null;
       public static void storeKT2ConnectionObj(Connection conn) {
       kt2Connection = conn;
       public static Connection getKT2ConnectionObj() {
       try {
          return kt2Connection;
       catch(Exception e){
          System.out.println(e);
      return null;
    }Now from the following code I am trying to get the connection object that is stored. But this is throwing NullPointerException.
    public class Metrics_Migration {
      public static void main(String args[]) {
         try {
        java.sql.Connection connection_1 =   GetKTConnectionObj.getKT6ConnectionObj();
         catch(Exception e){
    }

    kt2Connection is null. You need to store it first, to make it not null. Otherwise it will stay null forever. And why on earth are you trying to do this THIS way?
    If you are running the two applications separately, it wont work either.

  • Line Breaks missing in captions from other programs...

    I've spent the last few hours searching around, and I've been unable to find any solution to a weird thing I noticed.
    I've recently purchased LR 3.4.1 and when I imported a handful of older pics that had had the captions set using Bridge, the line breaks were now gone.
    I then went to Bridge and tested it, and sure enough, it can read line breaks from LR, but the opposite doesn't seem to be true. As part of my work, I get a bunch of photos that other photogs have shot and added captions to via Bridge, but I can't seem to find any check box or setting on how to get LR to read the line breaks.
    Any one have any advice on how to get LR to read line breaks from other programs? I'd hate to have to go through and re-caption each and every single photo, especially when adding the older ones into LR to use it as a DAM.
    Thanks!

    This is a long-standing, annoying bug in Windows LR that has been acknowledged by Adobe:
    http://feedback.photoshop.com/photoshop_family/topics/newline_bug_in_caption_text
    Please go to the feedback site and vote for that issue to get fixed.
    It is just a display problem in LR -- the line breaks in the metadata are preserved, and if you enter line breaks in the metadata, they are preserved too.

  • How to get the session name of a batch input

    hi everybody
    does anybody know how to get the session name of a batch input?
    I have to put the name of the session at the end of my program so that the user can click on the session name to go directly to SM35 to run the batch input when the program ends

    Hi sia,
    1. Table is APQI
    2. field name for session name is GROUPID
    regards,
    amit m.

  • How to schedule the job to run evry Sunday at 12 P.M IST.

    Hi Experts,
    I want to schedule a job which will run evry Sunday at 12 P.M IST.
    I have written the below script.
    [code]BEGIN
      SYS.DBMS_SCHEDULER.CREATE_JOB
           job_name        => 'SERVICE_SAL_FS.SAL_MESSAGE_BUFFER_PURGE_JOB'
          ,start_date      =>  SYSTIMESTAMP
          ,repeat_interval => 'FREQ=WEEKLY; BYDAY=SUN; BYHOUR=12;BYMINUTE=0; BYSECOND=0;'
          ,end_date        =>  NULL
          ,job_class       => 'DEFAULT_JOB_CLASS'
          ,job_type        => 'STORED_PROCEDURE'
          ,job_action      => 'SERVICE_SAL_FS.SAL_MESSAGE_BUFFER_PURGE_PROC'
          ,comments        => 'Run at 12 P.M.IST every Sunday'
          ,enabled            => TRUE
    END;[/code]
    But the server in US.
    [code]SELECT sysdate from Dual;
    6/11/2013 3:58:58 AM
    --But the time in India is 02:28 PM [/code]
    How to convert the timezone to IST.
    Please help me how to schedule the job to run evry Sunday at 12 P.M IST.
    Thanks.

    Did you read DBMS_SCHEDULER docs:
      The calendaring syntax does not allow you to specify a time zone. Instead the Scheduler retrieves the time zone from the start_date argument. If jobs must follow daylight savings adjustments you must make sure that you specify a region name for the time zone of the start_date. For example specifying the start_date time zone as 'US/Eastern' in New York will make sure that daylight saving adjustments are automatically applied. If instead the time zone of the start_date is set to an absolute offset, such as '-5:00', daylight savings adjustments are not followed and your job execution will be off by an hour half of the year.
      When start_date is NULL, the Scheduler will determine the time zone for the repeat interval as follows: 
    It will check whether the session time zone is a region name. The session time zone can be set by either:
    Issuing an ALTER SESSION statement, for example:
    SQL> ALTER SESSION SET time_zone = 'Asia/Shanghai'; 
      Setting the ORA_SDTZ environment variable.
      If the session time zone is an absolute offset instead of a region name, the Scheduler will use the value of the DEFAULT_TIMEZONE Scheduler attribute. For more information, see the SET_SCHEDULER_ATTRIBUTE Procedure.
      If the DEFAULT_TIMEZONE attribute is NULL, the Scheduler will use the time zone of systimestamp when the job or window is enabled.
    SY.

  • HOW TO MANAGE THE SESSION IN JSF 2.0

    Hi to All.
    I need your help, I am beginner in JSF 2.0, and wanted to know how the sessions work on jsf 2.0?. If you could send a small example.
    I need my web application is safe, for example I have a web page users.xhtml to this web page must be entered after the login.xhtml loggedin and redirect if it is not.
    On the other hand need to handle logout in my web application.
    I hope I can help.
    I thank you in advance for your help.
    Greetings.

    This may help you...
    1. What is Session Tracking?
    There are a number of problems that arise from the fact that HTTP is a "stateless" protocol. In particular, when you are doing on-line shopping, it is a real annoyance that the Web server can't easily remember previous transactions. This makes applications like shopping carts very problematic: when you add an entry to your cart, how does the server know what's already in your cart? Even if servers did retain contextual information, you'd still have problems with e-commerce. When you move from the page where you specify what you want to buy (hosted on the regular Web server) to the page that takes your credit card number and shipping address (hosted on the secure server that uses SSL), how does the server remember what you were buying?
    There are three typical solutions to this problem.
    1. Cookies. You can use HTTP cookies to store information about a shopping session, and each subsequent connection can look up the current session and then extract information about that session from some location on the server machine. This is an excellent alternative, and is the most widely used approach. However, even though servlets have a high-level and easy-to-use interface to cookies, there are still a number of relatively tedious details that need to be handled:
    * Extracting the cookie that stores the session identifier from the other cookies (there may be many, after all),
    * Setting an appropriate expiration time for the cookie (sessions interrupted by 24 hours probably should be reset), and
    * Associating information on the server with the session identifier (there may be far too much information to actually store it in the cookie, plus sensitive data like credit card numbers should never go in cookies).
    2. URL Rewriting. You can append some extra data on the end of each URL that identifies the session, and the server can associate that session identifier with data it has stored about that session. This is also an excellent solution, and even has the advantage that it works with browsers that don't support cookies or where the user has disabled cookies. However, it has most of the same problems as cookies, namely that the server-side program has a lot of straightforward but tedious processing to do. In addition, you have to be very careful that every URL returned to the user (even via indirect means like Location fields in server redirects) has the extra information appended. And, if the user leaves the session and comes back via a bookmark or link, the session information can be lost.
    3. Hidden form fields. HTML forms have an entry that looks like the following: <INPUT TYPE="HIDDEN" NAME="session" VALUE="...">. This means that, when the form is submitted, the specified name and value are included in the GET or POST data. This can be used to store information about the session. However, it has the major disadvantage that it only works if every page is dynamically generated, since the whole point is that each session has a unique identifier.
    Servlets provide an outstanding technical solution: the HttpSession API. This is a high-level interface built on top of cookies or URL-rewriting. In fact, on many servers, they use cookies if the browser supports them, but automatically revert to URL-rewriting when cookies are unsupported or explicitly disabled. But the servlet author doesn't need to bother with many of the details, doesn't have to explicitly manipulate cookies or information appended to the URL, and is automatically given a convenient place to store data that is associated with each session.
    2. The Session Tracking API
    Using sessions in servlets is quite straightforward, and involves looking up the session object associated with the current request, creating a new session object when necessary, looking up information associated with a session, storing information in a session, and discarding completed or abandoned sessions.
    2.1 Looking up the HttpSession object associated with the current request.
    This is done by calling the getSession method of HttpServletRequest. If this returns null, you can create a new session, but this is so commonly done that there is an option to automatically create a new session if there isn't one already. Just pass true to getSession. Thus, your first step usually looks like this:
    HttpSession session = request.getSession(true);
    2.2 Looking up Information Associated with a Session.
    HttpSession objects live on the server; they're just automatically associated with the requester by a behind-the-scenes mechanism like cookies or URL-rewriting. These session objects have a builtin data structure that let you store any number of keys and associated values. In version 2.1 and earlier of the servlet API, you use getValue("key") to look up a previously stored value. The return type is Object, so you have to do a typecast to whatever more specific type of data was associated with that key in the session. The return value is null if there is no such attribute. In version 2.2, getValue is deprecated in favor of getAttribute, both because of the better naming match with setAttribute (the match for getValue is putValue, not setValue), and because setAttribute lets you use an attached HttpSessionBindingListener to monitor values, while putValue doesn't. Nevertheless, since few commercial servlet engines yet support version 2.2, I'll use getValue in my examples. Here's one representative example, assuming ShoppingCart is some class you've defined yourself that stores information on items being purchased.
    HttpSession session = request.getSession(true);
    ShoppingCart previousItems =
    (ShoppingCart)session.getValue("previousItems");
    if (previousItems != null) {
    doSomethingWith(previousItems);
    } else {
    previousItems = new ShoppingCart(...);
    doSomethingElseWith(previousItems);
    In most cases, you have a specific attribute name in mind, and want to find the value (if any) already associated with it. However, you can also discover all the attribute names in a given session by calling getValueNames, which returns a String array. In version 2.2, use getAttributeNames, which has a better name and which is more consistent in that it returns an Enumeration, just like the getHeaders and getParameterNames methods of HttpServletRequest.
    Although the data that was explicitly associated with a session is the part you care most about, there are some other pieces of information that are sometimes useful as well.
    * getId. This method returns the unique identifier generated for each session. It is sometimes used as the key name when there is only a single value associated with a session, or when logging information about previous sessions.
    * isNew. This returns true if the client (browser) has never seen the session, usually because it was just created rather than being referenced by an incoming client request. It returns false for preexisting sessions.
    * getCreationTime. This returns the time, in milliseconds since the epoch, at which the session was made. To get a value useful for printing out, pass the value to the Date constructor or the setTimeInMillis method of GregorianCalendar.
    * getLastAccessedTime. This returns the time, in milliseconds since the epoch, at which the session was last sent from the client.
    * getMaxInactiveInterval. This returns the amount of time, in seconds, that a session should go without access before being automatically invalidated. A negative value indicates that the session should never timeout.
    2.3 Associating Information with a Session
    As discussed in the previous section, you read information associated with a session by using getValue (or getAttribute in version 2.2 of the servlet spec). To specify information, you use putValue (or setAttribute in version 2.2), supplying a key and a value. Note that putValue replaces any previous values. Sometimes that's what you want (as with the referringPage entry in the example below), but other times you want to retrieve a previous value and augment it (as with the previousItems entry below). Here's an example:
    HttpSession session = request.getSession(true);
    session.putValue("referringPage", request.getHeader("Referer"));
    ShoppingCart previousItems =
    (ShoppingCart)session.getValue("previousItems");
    if (previousItems == null) {
    previousItems = new ShoppingCart(...);
    String itemID = request.getParameter("itemID");
    previousItems.addEntry(Catalog.getEntry(itemID));
    // You still have to do putValue, not just modify the cart, since
    // the cart may be new and thus not already stored in the session.
    session.putValue("previousItems", previousItems);
    3. Example: Showing Session Information
    Here is a simple example that generates a Web page showing some information about the current session. You can also download the source or try it on-line.
    package hall;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.net.*;
    import java.util.*;
    /** Simple example of session tracking. See the shopping
    * cart example for a more detailed one.
    * <P>
    * Part of tutorial on servlets and JSP that appears at
    * http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/
    * 1999 Marty Hall; may be freely used or adapted.
    public class ShowSession extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    HttpSession session = request.getSession(true);
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String title = "Searching the Web";
    String heading;
    Integer accessCount = new Integer(0);;
    if (session.isNew()) {
    heading = "Welcome, Newcomer";
    } else {
    heading = "Welcome Back";
    Integer oldAccessCount =
    // Use getAttribute, not getValue, in version
    // 2.2 of servlet API.
    (Integer)session.getValue("accessCount");
    if (oldAccessCount != null) {
    accessCount =
    new Integer(oldAccessCount.intValue() + 1);
    // Use putAttribute in version 2.2 of servlet API.
    session.putValue("accessCount", accessCount);
    out.println(ServletUtilities.headWithTitle(title) +
    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
    "<H1 ALIGN=\"CENTER\">" + heading + "</H1>\n" +
    "<H2>Information on Your Session:</H2>\n" +
    "<TABLE BORDER=1 ALIGN=CENTER>\n" +
    "<TR BGCOLOR=\"#FFAD00\">\n" +
    " <TH>Info Type<TH>Value\n" +
    "<TR>\n" +
    " <TD>ID\n" +
    " <TD>" + session.getId() + "\n" +
    "<TR>\n" +
    " <TD>Creation Time\n" +
    " <TD>" + new Date(session.getCreationTime()) + "\n" +
    "<TR>\n" +
    " <TD>Time of Last Access\n" +
    " <TD>" + new Date(session.getLastAccessedTime()) + "\n" +
    "<TR>\n" +
    " <TD>Number of Previous Accesses\n" +
    " <TD>" + accessCount + "\n" +
    "</TABLE>\n" +
    "</BODY></HTML>");
    public void doPost(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    doGet(request, response);
    }

  • How to make the session to wait until other session get closed successfully

    Hi ,
    In my program , I am calling sql loader and after that I am opening a session and inside that I am calling stored procedure which validates the data.
    above calling of sql loader and stored procedure is done inside the shell script i.e .prog file which is registerd as host concurrent program.
    Here i am facing the problem like when two files are processed with same content then second file content's are not erroring out as duplicate though there is a duplicate validation exist inside the procedure. IF I call dbms_lock.sleep(60) then it is working and sencond file are records are error out with duplicate error message. but this is working only for small data files.
    Please suggest me how to make the session to come out successfully then only i can open other sesssion .
    Thanks
    Raghav

    user5853450 wrote:
    Hi ,
    In my program , I am calling sql loader and after that I am opening a session and inside that I am calling stored procedure which validates the data.
    above calling of sql loader and stored procedure is done inside the shell script i.e .prog file which is registerd as host concurrent program.
    Here i am facing the problem like when two files are processed with same content then second file content's are not erroring out as duplicate though there is a duplicate validation exist inside the procedure. IF I call dbms_lock.sleep(60) then it is working and sencond file are records are error out with duplicate error message. but this is working only for small data files.
    Please suggest me how to make the session to come out successfully then only i can open other sesssion .
    Thanks
    RaghavFor starters you could use external tables rather than SQL*Loader and then you could keep all the control on the database side of things rather than relying on an external utility. The external tables will give you all the functionality of SQL*Loader but all you to just read the data using SQL select statements instead and cut out all the shell script dependency.
    Alternatively you could also look at Job Chaining...
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14214/chapter1.htm#FEATURENO05574

  • How to set the IP and MAC address in C program?

    My working environment is Sun250 Server, Solaris 7 operating system. I encountered a problem ---- How to set the IP and MAC address in C program to make the system change it IP & MAC at runtime?
    Any idea is welcome! Thanks!

    Hi
    As a simplest possible solution, you can use the system command
    to run ifconfig that can set both the mac address and the IP address of the system. You will have to use setuid though.
    Or you can use the DLPI calls ( do a man DLPI or search for a
    Sun documentation on the same at http://soldc.sun.com) to write
    a pure C program.
    HTH
    Shridhar

  • How to find the sessions which generated maximum redo amount at instance?

    I use below query or Sql*Plus's set autotrace traceonly statistics > redo size statistic to calculate how much redo I generated in my session;
    CREATE OR REPLACE VIEW redo_size AS
    SELECT value
    FROM v$mystat, v$statname
    WHERE v$mystat.statistic# = v$statname.statistic#
    AND v$statname.name = ‘redo size’;
    But how to find the sessions which generated maximum(top 5 for example) redo from the last database startup on 9iR2 or also with new 10gR2 historic views?
    We need this information because from the produced archived log files we observe something new producing almost 2 times more redo for a week. I looked at statspack report but couldnt find as I suspected for a massive update or delete.
    Best regards,
    Tonguc

    I tried v$sysstat but I didnt think about v$sesstat Mr.Gasparotto, thank you very much :)
    SELECT ss.sid,
    sq.sql_text,
    se.status,
    se.username,
    se.osuser,
    se.program,
    se.machine,
    ss.VALUE
    FROM v$sesstat ss, v$statname sn, v$session se, v$sqlarea sq
    WHERE ss.statistic# = sn.statistic#
    AND se.sql_hash_value = sq.hash_value(+)
    AND se.sql_address = sq.address(+)
    AND ss.sid = se.sid
    AND sn.NAME = 'redo size'
    ORDER BY ss.VALUE DESC
    Best regards.

  • How to get the session variable value in JSF

    Hi
    This is Subbus, I'm new for JSF framewrok, i was set the session scope for my LoginBean in faces-config.xml file..
    <managed-bean-name>login</managed-bean-name>
    <managed-bean-class>LoginBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope> like that...
    So all parameter in LoginBean are set in session right ?... for example i used userId is the Parameter...
    Now i need to get the the userId parameter from that session in my another JSP page.. how i get that ?..
    Already i tried
    session.getAtrribute("userId");
    session.getValue("userId");
    but it retrieve only "null" value.. could u please help me.. it's very urgent one..
    By
    Subbus

    Where i use that..is it in jsp or backend bean...
    simply i use the following code in one backend bean and try to get the value from there bean in the front of jsp page...
    in LogoutBean inside
    public String getUserID()
         Object sessionAttribute = null;
         FacesContext facescontext=FacesContext.getCurrentInstance();
         ExternalContext externalcontext=facescontext.getExternalContext();
         Map sessionMap=externalcontext.getSessionMap();
         if(sessionMap != null)
         sessionAttribute = sessionMap.get("userId");
         System.out.println("Session value is...."+(String)sessionAttribute);
         return (String)sessionAttribute;
         return "fail";
    JSP Page
    <jsp:useBean id="logs" scope="session" class="logs.LogoutBean" />
    System.out.println("SS value is ...."+logs.getUserID());
    but again it retrieve only null value.. could u please tell me first how to set the session variable in JSF.. i did faces-config only.. is it correct or not..
    By
    Subbus

  • How to exit the session at the end of the current page

    hi gurus,
    i want to exit the session at the end of the current page, so that when i am trying to open some other  page in the same browser it should ask for login id & pwd and should not pick the previous session-id.
    Regards,
    srikar

    Look at the below links, it might help you..
    [Link1|Re: Navigation with a new session]
    [Link2|how to end a session in bsp ?]
    Raja

  • How to remove the Sessions used in the application

    Hai Techies,,,
    i am using many number of sessions in my application, for example i am using 5 sessions in reports module
    my application is a web based application
    if can't remove the sessions it contains the huge amount of data , my application is going into mess, and the application performance will be decreased..
    Can anybody tell the solution for this Problem
    How to remove the Sessions used in the application
    Hoping a reply
    Thanks & Regards
    Krishna mangamuri

    Hai Gita,
    i am not able to do the session invalidate method bcoz, i am mainatainting the session from login along with the current userid who is login into the system and putting some of the data in session....
    thats session is to be valid upto when i click on logoff link
    except that i have to remove the sessions in my application
    while navigating from one jsp to another i have to remove the sessions, bit somes times that sessions may be used somewhere
    Can u Understand My problem
    session remove method may also helpful to me but some times it will casue some prob to me
    Is there any other Way to remove the sessions in the Application ????
    Thanks & Regards
    Krishna Mangamuri

Maybe you are looking for

  • What exactly is Sand Box and what does it do?

    What exactly is Sand Box and what does it do? I think it works in the Security Mechanism of Java as a Byte Code Verifier (or atleast as a part of the Byte Code Verifier).. Your thoughts please..?

  • Upgrading from iPhone 4s to 6 before iOS 8

    Hi there, My wife has an iPhone 4s running ios 7. Her new iPhone 6 just arrived. We are backing her phone up to iCloud. Question: do we need to upgrade this old phone to ios 8 before transferring everything to new phone or can we just restore from th

  • Error Message "Adobe Connect Add in 9.4 r96 has stopped working"

    When hosting meeting and I connect the camera the error message comes up and crashes the meeting. I am using MS Explorer 9.0 8112.16421 and Connect 8. Any idea this has just started in the last week.

  • UCCX 8.0 SNMP notification to report failover from active to the standby server?

    Does any know the UCCX 8.0 SNMP notification to report failover from active to the standby server?  (The specific notification.) ftp://ftp.cisco.com/pub/mibs/v2/CISCO-VOICE-APPS-MIB.my I see this in the MIB. cvaModuleStart NOTIFICATION-TYPE   OBJECTS

  • Additions to Notes Disappear

    I've been noticing that when I update any of my notes and then go back to them later on they have reverted to the original note without any of the new additions I put in them. I have MobileMe but I do not have my notes checked to sync with it on any