How to keep alive a session with a timeout

my session have a timeout of 20 minutes (it's a system setting i cannot change)
i run a program that generates a file excel that need 60 minutes to  end.
i cannot run the program in background because OLE and creating excel is not supported
is there a way to avoid my session time out?
is there a way to make the sistem don't close my session while it's creating my file excel?
thanks,
Giacomo

Giacomo,
Try it.
REPORT  zz_keep_alive.
CLASS lcl_trigger DEFINITION.
  PUBLIC SECTION.
    METHODS: fim_timer FOR EVENT finished OF cl_gui_timer.
ENDCLASS.                    "lcl_event_handler DEFINITION
CLASS lcl_trigger IMPLEMENTATION.
  METHOD fim_timer.
    cl_gui_cfw=>set_new_ok_code( new_code = 'ONLI' ). "ONLI = Executar
  ENDMETHOD.                    "fim_timer
ENDCLASS.                    "lcl_event_handler IMPLEMENTATION
DATA: r_timer   TYPE REF TO cl_gui_timer.
DATA: r_trigger TYPE REF TO lcl_trigger.
PARAMETERS: p_uzeit TYPE sy-uzeit.
AT SELECTION-SCREEN OUTPUT.
  p_uzeit = sy-uzeit.
  CREATE OBJECT: r_timer, r_trigger.
  SET HANDLER r_trigger->fim_timer FOR r_timer.
  r_timer->interval = 60.
  r_timer->run( ).
Hope it helps.
Rgs
Paulo Afonso Cordeiro

Similar Messages

  • How to keep alive a session in Web Services?

    I have to do my project, that will be including some following features:
    1. Login to Application through Web Services method. For example:
    http://mydomain.com/web-services/Login?WSDL
    2. After logging in, use mySms method to send message to Cellphone through Web Services! For example:
    http://mydomain.com/web-services/mySms?WSDL
    My questions are:
    1. How can I keep alive the session after logging in the application in Web Services? In Web, I can use "Session".
    2. If someone has not logged in the Application, he/she could not use mySms method for sending Sms. How can I do that?
    3. I know, when I invoke a Web Services, one JavaBean has been called, and this bean is persistence with his own states. It means, if I set value to parameters of this bean, these values are persistence for invoked methods by other persons.
    For example:
    mySms bean has a private field "jid" inited with NULL value.
    Person A invoked mySms.
    Then, A set jid of mySms to value "A".
    Person B invoked mySms. B got jid value. He receive the result value is "A".
    The question is, how can I set mySms bean so that mySms bean is not persistence?
    Thanks many!

    Hi,
    I can right away answer your FIRST Question.
    Since WebServices are PURELY Based on SOAP which is in tern based on HTTP, they rely on a Stateless protocol.
    I am sure you know that the HTTP is the STATELESS Protocol and so you can not maintain Session and so EACH Http REQUEST is considered as a SEPERATE REQUEST.
    Now, still you want to maintain the Session in WebServices,
    The simple answer is PASSING PARAMETERS.
    Just Maintain your Session on Client (If you are using JSPs or Servlets to CAll WEBSERVICES then maintain Session through your HTTPSession) and each time you Invoke WebService PASS ON REQUIRED Parameters.
    This Approach is Exactly like your URL REWriting OR your Parameters Passing through QUERY STRINGS.
    I hope you got what I am saying!
    Take care,
    Himanshu/

  • Keep alive a session between 2 BAPI calls

    Hi -
    I am calling several BAPIs to maintain data. I am calling from an outside system as I published the BAPIs as Web Services.
    I would like that the session between 2 BAPI calls is kept, so I don't miss some session info between call #1 and call #2.
    Anyone knows a way of keeping alive a session between 2 BAPI calls?
    Thanks !

    Try this..
    <b>ARFC with Resource Management (Parallel Remote Function Call)</b>
    CALL FUNCTION 'MYFUNC'
    STARTING NEW TASK 'T1'
    DESTINATION IN GROUP 'PRFC'
    EXPORTING ...
    TABLES ...
    EXCEPTIONS ...
    communication_failure = 100
    system_failure = 101
    resource_failure = 200.
    IF sy-subrc= 102.
    wait and retry...
    ENDIF.
    <b>Define ‘PRFC’via RZ12</b>
    Amandeep

  • How to Keep Alive a specific HFM application

    My PRD landscape has 2-3 applications. Whenever any application loads for the first time in the memory, it takes quite some time before it is loaded. Once the application is loaded, the response times are pretty quick and acceptable.
    During specific parts of the day / month, a specific application becomes active. During this time, other applications may or may not be used, but one specific application is definitely used. I want to keep this application's cubes loaded in the RAM, so that response times are quick, whenever the user needs it - whether for the first time or otherwise.
    How to keep alive a specific application's cubes alive and loaded in RAM? I am not looking for general solution like setting the "FM Service" to Automatic (currently it is set Manual) - setting this to Automatic, will affect all applications. However, I am looking for a specific application at a specific period of time.
    I am ok with a custom solution if required. Let me know, what are my options.

    I think you are looking for an inappropriate solution to your problem. Most HFM applications take a few seconds to start up. If your application takes such a long time to start up you really need to examine the root cause. Start by removing the Sub NoInput and Sub Input routines in your rules to see if this is the reason the application takes so long to start.
    If the removal of those routines does not significantly change the startup time, look through the event logs for possible causes. It is possible you have a connection problem with the Oracle database for example, or you have an environment configuration problem where the HFM application servers have a very slow connection to the database server, or possibly the database server performs poorly.
    I strongly suggest you investigate these root casues first before trying to make HFM behave in a non-standard way. Certainly you can start the HFM Management Service, which will start all of your HFM applications and keep them all up and running. This approach does not allow the applications to shut down on their own though. Only use this if you have exchausted your investigations (as I suggsted above).
    --Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Keep alive a session in CRM

    Dear CRM folks -
    I am calling CRM using BAPIs. The BAPIs are published as Web Services.
    I would like that the session between 2 BAPI calls is maintained in an optimized way so I don't make specific calls to the DB to store my session info.
    Anyone knows a way of keeping alive a session in the CRM between 2 BAPI calls?
    Thanks !

    BAPIs are just basically function modules.  Two function modules which are in the same function group are able to share information while the session is open.
    If your two BAPIs are not in the same function group(you didn't mention the names or I could have checked) then you can create a wrapper function module which has it's own variables to store the information.  Unfortunately once the RFC session/ICM Web Session is closed then you'll lose that in-memory information.
    I assume that you're making the two BAPI calls at different times which is why you're having this problem.  Like one to get user information and then one more to get some other detailed info once the user inputs something.
    Without knowing much about what you are really trying to do, my quick idea is to create a Stateful BSP in CRM which accepts all your requests.  The BSP can simply call the BAPIs(eliminate the need for the web service - unless you have some reason you need it) and then between the first and second BAPI call, the BSP will keep the state of the BAPI results in-memory.
    If you give more info, might be easier to answer your question.

  • If user disable cookie how to set and use session with URL Rewritting

    if user disable cookie how to set and use session with URL Rewritting by append session ID in url

    If cookies are disabled, then app server will automatically try to use URL rewriting for session control. Programmer's responsibility is to encode any links or redirects using
    response.encodeURL("/yourPage.jsp")
    and
    response.encodeRedirectURL("/yourPage.jsp")
    See API for details
    http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletResponse.html#encodeURL(java.lang.String))

  • HFM Web Sever Configuration--Keep Alive and Session Time Out Optimal Config

    We recently implemented an HFM 9.3.1 environment. We are using Windows 2003 Enterprise SP2 servers with IIS6. We have two HFM Web servers connecting to an application cluster with two application servers in the cluster. We were getting some errors when trying to unlock HFM cells in Workspace, but we were able to perform the functions fine on the application using the WIN32 client.
    I opened a ticket with support and they recommended modifying the subcontext.properties file located in %HYPERION_HOME%\deployments\WebLogic9\servers\Workspace\webapps\workspace\conf. They recommended changing the following settings:
    #KeepAliveInterval=30
    #SessionTimeout=60
    From what I understand, these settings are for the communication between the HFM Web Servers and the application cluster servers. I'm wondering how changing these settings may affect our environment. Are there negative effects and/or trade-offs for changing these settings? Is there a recommended threshold or maximum value?

    Hi Dinesh,
    This cannot be achieved without development enhancements to some standard SAP framework component, to introduce a "keep-alive" concept. If you are using a CMS for CTI or email integration, you need to ensure it supports keeping the communications session alive also.
    Sincerely,
    Glenn
    Glenn Abel
    Covington Creative
    www.covingtoncreative.com

  • How to keep track of sessions ?

    Hi,
    Recently at an interview I was asked that how do you keep track of n number of user sessions in JSP ?
    Can somebody help me with the answer that I should have given ?
    Thanks.

    You would have to extend the session handling system using the various listeners for Session events. Check out the package javax.servlet.http.
    SessionListener: responds to sessionCreated/sessionDestroyed - so you can keep track of sessions as they come/go.
    You then also keep in memory (either a singleton, or in application scope) a permanent map of all the sessions. That way you knoe exactly how many sessions there are, and can get at the data for any or all of them.
    (Note this is a potential security risk, which is why the functionality was removed from the servlet framework)
    Another approach would be to use a SessionBindingListener, on a user object. This listener fires events when the object is bound/removed from a session
    Assuming it is an Intranet, where a user logs in, and after login, a "User" object is placed into session. This will let the user object fire an event whenever it is bound - ie when you log in. Thus you can keep track of who is logged in, and if they are logged in multiple times.
    Hope this helps some,
    evnafets

  • How do I create a session with the datasource set in code not sessions.xml

    I want to create a session where I specify the J2EE datasource name dynamically in code. Normally, I would hard-code a J2EE datasource name in sessions.xml e.g.
    <login>
    <datasource>jdbc/MyApplicationDS</datasource>
    <platform-class>oracle.toplink.platform.database.oracle.Oracle10Platform</platform-class>
    <uses-external-connection-pool>true</uses-external-connection-pool>
    <uses-external-transaction-controller>true</uses-external-transaction-controller>
    </login>
    However, we don't want to use a hard-coded string "jdbc/MyApplicationDS". We want to be able to set this at runtime.
    I found this in the App Developer's Guide:
    Configuring an External Connection Pool in Java
    To configure the use of an external connection pool in Java:
    1. Configure the DataSource on the server.
    2. Configure the Login to specify a DataSource and the use of an external connection pool:
    login.setConnector(
    new JNDIConnector(new InitialContext(), "jdbc/MyApplicationDS"));
    login.setUsesExternalConnectionPooling(true);
    and this:
    Configuring Sessions with the sessions.xml File
    OracleAS TopLink provides two ways to preconfigure your sessions: you can export and compile Java source code from the OracleAS TopLink Mapping Workbench, or use the OracleAS TopLink Sessions Editor to build a session configuration file, the sessions.xml file.
    It seems like I should export and compile Java code that calls login.setConnector(), but I can't find out any information on how to do this. I looked at the MW user guide and I didn't see anything on this.
    I also found this by searching this discussion forum:
    To create a server session completely from code given a project you can use,
    project.getLogin().setConnector(new JNDIConnector(new InitialContext(), "your-datasource-url"));
    project.getLogin().setUserName("");
    project.getLogin().setPassword("");
    Server server = project.createServerSession();
    server.login();
    However, I don't know how to get the project.
    Thanks,
    Vicki

    If you are using a sessions.xml file, you can get your project from your session. Ensure that when you access your session from the SessionManager, that you do not have it login.
    Session session = SessionManager.getManager().getSession("my-session", false);
    session.getProject().setConnector(...);
    session.login();
    If not using a sessions.xml, you can either read your Project from the XMLProjectReader, or instantiate your Project class directly.

  • How to undo activated OSB session with WLST?

    Does anybody know if there´s a chance to undo an activated OSB session with WLST?
    There´s a way to undo an UNactivated session but not an activated one (like the undo session in /sbconsole).
    Thanks in advance.
    Edited by: 956378 on 31-ago-2012 12:48

    "zone copy active-zoneset full-zoneset vsan 2" is the correct command.  It will overwrite the full zoneset (identical) and ready to edit.

  • How to keep dvd burn session open

    When i backup my photos for storage onto a DL DVD or on any cd/dvd the burner closes the session after the burn. Are there settings that can be changed to allow a burn session to remain open so i'm not wasting storage space?

    There is nothing remotely resembling a standard for multi-session DVDs. That is probably why Apple provides no option for this at all.
    The other poster included a link to instructions on how to make a multi-session CD. Those instructions won't work for a DVD.

  • How to keep your old number with a new iPhone

    I find this confusing.
    I have an iPhone 4 with an AT&T contract.
    I am eligible for an upgrade and have ordered an iPhone 5 from Apple.
    What steps do I have to take to keep my old telephone number on the new iPhone 5?
    I believe this answer from AT&T is nonsense:
    Upon reviewing your account I have found the following information. In
    order for you to utilize the iPhone 5 on your current phone number, you
    must return the iPhone 4 you recently purchased. You will be charged the
    restocking fee for the return. You must return it with the original
    packaging to the location from which the device was purchased. I show
    that you purchased the device at an Apple store.
    They can also assist you with preordering an iPhone 5. Once they have
    processed your return of the iPhone 4, it should allow them to pre-order
    your iPhone 5.
    Can anyone _please_ tell me how I go about keeping my old number when the new iPhone arrives?
    Many thanks.

    you should never have to return the product once you bought and are under contract.  At no point can they make you return it. 
    As far as the iPhone 5 is concerned, just like Brad said, activate it through itunes and if a problem arises just call att.

  • How to keep last line together with table?

    Hi guys,
    I am new to Reports , so please excuse me for probably primitive question.
    I am creating consolidated invoices report consisting of invoice date + 2 last lines of company signature like Yours, XXYYY Ltd.
    Depending on number of lines in invoice data it is possible that only these 2 signature lines are printed on last page.
    How to force keeping them together with invoice data?
    Thanks in advance,
    Asnate

    Hi,
    If you have repeating Invoice lines, and they are filling up your page, then there is no other option but to orphan the "Yours, XXYYY Ltd" onto another page.
    Somethings you can do increase the amount of space on your page is decrease the size of your top and bottom margins, and also make sure you have no excess whitespace either in your template or within your placeholders.
    Unfortunately, anything that is displayed after a table of repeating lines, where there is no limit to the number of lines, is susceptable to being orphaned, as there is no guarantee that it will fit onto the page.
    Hope this helps,
    Cj

  • How to keep alive RS232 connection

    Hello everyone. I have a problem with RS232 communication. To activate the connection I have to send the string "RS232", then to keep it alive I have to send every second CR, but in the meantime, I must be able to send other character strings without delay on the same port (COM7). Can anyone help me?
    Thanks 
    Solved!
    Go to Solution.

    RS232 standard does not require by itself to be kept alive someway, so I suppose is your remote device that requires it.
    In every case, you could create a 1-sec timer and have its callback send CR periodically over the serial port.
    To avoid conflicts between this task and the rest of the application you could use a lock: basically, after creating the lock, each function that wants to access the serial port must call CmtGetLock (), operate on the port and call CmtReleaseLock () afterwards. If the lock is owned by another function, other functions trying to get access are frozen waiting for the lock, so you must be careful in designing com-related function so that they are fast. If you do not want to have some function be blocked while waiting for the lock you can use CmtTryToGetLock instead of CmtGetLock. A few informations on locks can be found in this tutorial as well as in this chapter of the Programmer reference.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How to use "URLConnection" in sessions with more than one screen??

    Hi,
    Requests can be sent to http servers using "URLConnection" objects. The responses can be parsed via their InputStream; so far so good...
    Question is:
    What can I do when I want to send a request to a server where there is first a log-in screen and only then there is the desired screen where the real request should be sent?
    Since the REAL request cannot be directly sent without the authentication check first, I need some kind of "context" or session in which I may make some consequent actions... Sending an independent request using a diferent URLConnection just won't do since I'm unauthorized via the second connection!!
    Generally, I need a way to send consequent requests where the second request may be sent only if the first request authenticated me...
    How can I do that? (Hope my question is clear...)
    --Amir.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Well, you will have to deal with the cookies or however the server knows you are authenticated. Personally I prefer to use something like Apache HttpClient rather than dealing with icky details like that on my own.

Maybe you are looking for

  • A strange error when starting up Oracle database

    When I was starting up an Oracle DB instance on HP-UX B.11.23 U ia64 host, a strange error message was encountered as follows: ====================================================== SQL*Plus: Release 9.2.0.8.0 - Production on Sat Sep 1 21:50:05 2007

  • How to Move Offline Files Cache in Windows 7?

    I'm using the offline files feature in Win7 (much better implementation, btw - kudos!) and I've run into a problem:  the CSC is using up all the drive space on C:\.  I'd like to move the CSC to D:\, however I've been unable to do so. I've seen this p

  • Importing data from Essbase to Excel

    Hi All, We are using classic Hyperion Planning application for meeting our "Budgeting and forecasting" needs. Along with this we are also maintaining excel worksheets for other finance related activities. I was wondering if there is any way through w

  • Purchased ringtones disappeared off phone after upgrade

    Since upgrading my iPhone recently and using iCloud I've lost all the ringtones I'd purchased and they don't appear on iTunes to download again. How can I rectify this please?

  • Unable To Download. Error Getting License. License Server Communication Problem: E_ACT_NOT_READY

    I just downloaded a book from my local library and every time I try to open the download I get a message reading: Unable To Download. Error Getting License. License Server Communication Problem: E_ACT_NOT_READY Does anyone know why this is happening