Timer function in ABAP

Hello,
I have requirement to cancel execution of a function module if it exceeds 10 Sec. How do i do this in ABAP.
This FM is sending data through XI and waiting on confirmation from a external system through XI. But the requirement is to wait only for 10 sec and if no response continue the process after the FM.
Any help in this highly appreciated.
Thanks!!
Harprit

<b>GET_JOB_RUNTIME_INFO</b> Get the current job number from a program. Also returns other useful info about the current job.
<b>ENQUE_SLEEP</b> Wait a specified period of time before continuing processing.
<b>ENQUEUE_ESFUNCTION</b> Lock an abap program so that it cannot be executed.
Set the parameters as follows:
  RELID = 'ZZ'
  SRTF2 = 0
  SRTF = (your report name)
Please note that you should not use SY-REPID to pass your report name to the function. The value of SY-REPID will change as it is being passed to the function module, and will no longer hold the value of the calling report.
regards
vinod

Similar Messages

  • How to extend the execution time of an ABAP Program using the Process chain

    Hello Sapians,
    Our Environment has got 600seconds = 10 mintues as the execution time.
    My ABAP Program is taking more than this 600 seconds, to show the result, I found this when I tried to execute in debug mode, it shows the result.
    If I execute in background also it shows the results succesfully.
    Only issue is when I execute this report in foreground it has been taking ages and goes on Time OUT Error.
    It has been decided that we can extend the execution time only for this report, and it will reset the time back to 10mintues once the report has been executed successfully or failed in between for any other reasons.
    And we can achieve this by using the process chains.
    Can any body help me please in this regard
    Thanks,

    Hi,,,,,,,,,,
    Besides Process Chain There is another way out for this........
    Resetting time counter of dialog process so that time-out does not
    happen. Use this fm within your program at appropriate locations to
    reset time counter.
    "CALL FUNCTION 'TH_REDISPATCH'."
    Thanks
    Saurabh

  • HT204406 Hello,  I have songs that show they are "Waiting" for download from the cloud but they are greyed out.  Some songs in one album are done others in the same album will not download. It is not a time function because i have been working on this for

    Hello,  I have songs that show they are "Waiting" for download from the cloud but they are greyed out.  Some songs in one album are done others in the same album will not download. It is not a time function because i have been working on this for weeks. I have allowed my compter to run for days and the songs are still not accessible.  I have a Match subscription and Match is working.  If I click on the "Genre" link the greyed out songs show that they are ready for download from the cloud but I cannot download them.  I have downloaded over 1500 other songs, so I am trying to understand what is going on here. I would appreciate any help anyone can give me.
    Thanks

    I did think about that and if I have to I will do that, however there are about 50 songs. I have closed and reopened iTunes several times and I am sure that I have the latest version. It fails right away but I can click on the cloud download icon and download the song that it failed on ... therefore it is not that song "or any one song" causing the issue. Any ideas?

  • How to use elapsed time function with state machine in Lab VIEW

    Hello
    I've been trying to use state machine with elapsed time function in order to sequentially start and stop my code. The arrangement is to start the code for 1 minute then stop for 5 minutes. I've attached the code, the problem is when I place the elapsed time function out of the while loop it doesn't work, on the other hand when I place it inside the loop it does work but it doesn't give the true  signal to move to the next state. 
    Could you please have a look to my code and help me to solve this issue.
    Regards 
    Rajab
    Solved!
    Go to Solution.
    Attachments:
    daq assistance thermocouple(sate machine raj).vi ‏436 KB

    Rajab84 wrote:
    Thanks apok for your help
    even with pressing start it keeps running on wait case 
    could you please explain the code for me, the use of Boolean crossing, increment , and equal functions 
    Best Regards 
    Rajab 
    OK..I modded the example to stop after 2 cycles. Also recommend taking the free online LabVIEW tutorials.
    run vi. case statement goes to "initialize", shift registers are initialized to their constants. goto "wait"
    "start"= false, stay in current state. If true, transition to "1 min" case
    reset elapsed timer with True from shift register(counter starts at zero)."time has elapsed"=false, stay in current state(1 min). If true, goto "5min" case
    reset elapsed timer with True from shift register of previous case(counter starts at zero)."time has elapsed"=false, stay in current state(5 min). If true, goto "1min" case. Also, bool crossing is looking for "true-false" from "5 min" compare function to add cycle count.
    Once cycle count reaches 2, stop while loop.... 
    Attachments:
    Untitled%202[1].vi ‏42 KB

  • I am looking for an app that can unmute my iphone after a preset time, eg 1 or 2 hours. Does anybody know an app with this feature?? The apps I have found are linked to a calendar or a place, I just need the timer function..

    I am looking for an app that can unmute my iphone after a preset time, eg 1 or 2 hours. Does anybody know an app with this feature?? The apps I have found are linked to a calendar or a place, I just need the timer function..

    thanks. yes i am aware of the VoiceOver feature but it is NOT the solution to my problem. as you said, it is a solution to a different set of issues. i want the text to speech ability because i there are books i need to read but do not have the time to sit down and read them and have become used to listening to them read to me either by a professional human reader or with the text to speech software on the Kindle.
    I think Apple makes the best audio devices but i am really disappointed in this inexplainable shortcoming. if apple can give us siri they ought to be able to design a nice little button that i can push to turn on text to speech while i am in a document, book, magazine or webpage. clearly it is possible as apple has added the "reader" button in safari to have web pages dropped into the reader format.
    thanks for your suggestion though, it is what everyone suggests but it does not address the issue.

  • Approximate operator and recursive call function in abap

    Dear expert,
    Please give me an example about Approximate operator and recursive call function in abap
    thanks so much

    Hi
    About Approximate operator, you can go to tcode 'ABAPDOCU', searching CO,CN,CA etc...each of them have example there.
    And recursive function,
    Say here is a FM,
    FUNCTION recursive_get_number.
    *import im_num type i.
    *export ex_num type i.
    ex_num = im_num + 1.
    IF ex_num GE 100.
       EXIT.
    ELSE.
       CALL FUNCTION recursive_get_number
            EXPORTING
               im_num = ex_num
            IMPORTING
               ex_num = ex_num.
    ENDIF.
    ENDFUNCTION.
    When you call this function from outside with importing parameter '1',  then will return you 100.
    regards,
    Archer.

  • How to use RTRIM function in ABAP

    Hey,
    I have a question on using trim function in ABAP. According to all documents, I should be able to use rtrim as
    shorttext = rtrim('abcde-xx', '-xx').
    But when I do that, it gives me an error message "Comma without preceding colon (after shorttest?)"
    Anyone can tell me why is this happening? how should I use this trim function? And for me to cut off variable's last few character, what else method can I use? 
    Thank you very much.

    DATA : T1    TYPE STRING VALUE 'abcde-xx',
                T2    TYPE STRING  VALUE '-xx'.
    REPLACE T2 INTO T1 WITH SPACE.
    WRITE :/, T1.
    result output is :    'abcde'.
    regards
    Guna

  • Using time() function in multithreaded application

    I am using time() function in a multithreaded application with NULL argument for getting current time.
    Some time it's observed that we get a time one minute earlier than current time (3600 seconds).
    Is there a problem in the usage of the function?
    I am using expression : currenttime = time(NULL);
    I had seen some people using following way - time(&currenttime );
    Will above two behaves differently in multithreaded environment?
    [I  am using  Sun C++ 5.5 compiler on Solaris 8]

    How do you compare actual time against the time seen by your threads? If your threads are printing the value from time(2) to stdout, it's possible that you're seeing an artifact of thread scheduling and/or output buffering.
    I really doubt that you have a concurrency problem, but anyway make sure that you include the -mt option on your compile line:
    CC -mt blahblahblah...

  • IP - Is it possible to call exit planning function from ABAP Report..

    Hi All,
    Greetings.
    Is it possible to call exit planning function from ABAP Report (t-code SE38) ? Or I mean is not limited only to be called from ABAP Report, perhaps from BSP / Web-Dynpro / Function Module.
    If somebody here has been doing it before, I'm keen to ask to kindly share it. Particularly how to call and transfer data to that exit function.
    Or if somebody has done in BPS, appreciate if it can be shared too .
    Thanks a lot and have a good day,
    Best regards,
    Daniel N.

    Hi.
    You can achive this as suggested by Mattias in your previous post.
    Lets say you have next data structure:
    CostCenter | Amount | PercentForDistibution |
    Create input ready query in this format. Restrict cost center by variable type range.
    Create WAD with analysis item.
    When you run web page you enter range of cost centers (lets say you will enter 101004 to 101010).
    I assume you have data only for 101004 in your cube (lets say 1000).
    You will see only one record in your webpage.
    CostCenter | Amount | PercentForDistibution |
    101004       | 1000     | NOTHING
    When you create WAD in analysis item properties set "NUMBER_OF_NEW_LINES" to lets say 1 (so in WAD you will see always one blank line for entering new data).
    Just add 6 new records:
    CostCenter | Amount   | PercentForDistibution |
    101005       | NOTHING| 10
    101006       | NOTHING| 30
    101007       | NOTHING| 20
    101008       | NOTHING| 25
    101009       | NOTHING| 5
    101010       | NOTHING| 10
    Then run planning FOX function like this:
    FOREACH Z_COST_CENTER.
    IF {Amount, Z_COST_CENTER} <> 0
    Z_AMNT_TO_DISTRIBUTE = {Amount, Z_COST_CENTER}.
    ENDIF.
    ENDFOR.
    FOREACH Z_COST_CENTER.
    IF {PercentForDistibution Z_COST_CENTER} <> 0.
    {Amount, Z_COST_CENTER} = Z_AMNT_TO_DISTRIBUTE * {PercentForDistibution Z_COST_CENTER}.
    ENDIF.
    ENDFOR.
    It is not perfect FOX, but as an idead, it should work.
    Regards.

  • I need a timer function to ping the server every 5 secs??using threads.

    I need a timer function to ping the server every 5 secs??
    using threads...i have to use a thread coz i cant use Timer and Timer Task coz clients r on the JDK1.2 version.I have created a thread which keeps checking th ping msg & any server msg is pings 4 the1st time properly but then it just waits to read the response from server but it doesnt but the server shows that it has send the msgs to client???PLEASE HELP URGENT

    Few things are not clear from your post, like, are you using sockets and if you are, how are u reading writing to them (ur sample code would help)...
    Anyways if you are, are you doing accept on your socket in a while(true) loop or just once... If you do it only once you will get the first ping message but none afterwards if the other side closes and opens new sockets for every send... What I am suggesting is something like the following:
    ss = new ServerSocket(port);
    while(true)
         s = ss.accept();
         is = s.getInputStream();
         os = s.getOutputStream();
         reader = new BufferedReader(new InputStreamReader(is));
         writer = new BufferedWriter(new OutputStreamWriter(os));
         String in = reader.readLine();
            // do something with this string
            s.close();
            // put some check here to break out of this infinite loop
    }// end of While

  • MULTIPLE LEAD TIME FUNCTIONALITY

    Hi Guys,
    can anyone explain about "Multiple lead time functionality in SAP".
    whether its related to any particular modules.pls provide any inputs or send some link were i can get this requirements,

    hi
    please refer to this document
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0901cba-f49e-2910-748c-d7ce4c0c4c1c
    you may find it helpful
    regards
    Aakash Banga

  • In the numbers app, using the "date and time" function, is it possible to remove the time? I need to put together a list of dates, but I don't need or want times.

    In the numbers app, using the "date and time" function, is it possible to remove the time? I need to put together a list of dates, but I don't need or want times.

    When formatting your column to date/time, pick Date & time, and then pick the letter i in the circle to the right. Then scroll down and pick "No time"
    Jason

  • Does the Timer() function support multithread?

    Hello,
    In my application, there would be more than 1000 conversations to be monitored. I am going to design a woker thread for each conversation to determine the timeout of the communication, so I must using the timer mechanism. Due to just can create (max )16 async timers, so I want to use Timer() in the worker thread. I'd like to know if the function support multithread and if it will not be disturbed in a thread?
    David

    Hi David,
    The 'timer' used by the Timer() function is global and not thread specific. Note that Timer() returns the number of seconds elapsed since the FIRST call to the Timer() function. This is independent of the thread where the FIRST and current calls take place. So, the values returned are kind of a global 'time' since the first Timer() call in your program. I would recommend that you FIRST call Timer() in your main thread before running your other threads and then the other values returned in any thread are the 'seconds' since this call.

  • Time Function in Oracle

    Note that there is no specific time function in Oracle.
    What is the most efficient way to change the time segment of a Date or Timestamp field (column)?
    I need to pick up the date from the system but the time requires manual entry.
    Thanks

    And if you want to do some calculations with them, this will give you some ideas:
    SQL> select sysdate
      2       , sysdate + interval '1' minute
      3       , trunc(sysdate) + numtodsinterval(7,'hour')
      4       , trunc(sysdate) + 7/24
      5    from dual
      6  /
    SYSDATE             SYSDATE+INTERVAL'1' TRUNC(SYSDATE)+NUMT TRUNC(SYSDATE)+7/24
    01-10-2007 07:34:02 01-10-2007 07:35:02 01-10-2007 07:00:00 01-10-2007 07:00:00
    1 rij is geselecteerd.
    SQL> select systimestamp
      2       , systimestamp + interval '5' hour
      3       , trunc(systimestamp) + numtodsinterval(60 * 7 + 38,'minute')
      4       , trunc(systimestamp) + (60 * 7 + 38) / (24 * 60)
      5    from dual
      6  /
    SYSTIMESTAMP
    SYSTIMESTAMP+INTERVAL'5'HOUR                                                TRUNC(SYSTIMESTAMP) TRUNC(SYSTIMESTAMP)
    01-10-07 07:34:02,296000 +02:00
    01-10-07 12:34:02,296000000 +02:00                                          01-10-2007 07:38:00 01-10-2007 07:38:00
    1 rij is geselecteerd.Regards,
    Rob.

  • How to write a use time function in elsif

    Hai All
    I have generated an attendance form and my problem is while i am using elsif insert operation there and there is no updation.
    My need is
    this is my table structure
    EMPCODE NUMBER
    EMPNAME VARCHAR2(25)
    BARCODE VARCHAR2(25)
    INTIME VARCHAR2(25)
    OUTTIME VARCHAR2(25)
    INTRTIMEIN VARCHAR2(25)
    INTROUTTIME VARCHAR2(25)
    ATTEND_DATE
    when timing between 0145 and 0630 then update in outtime
    and 0630 to 1000 then insert in intime column
    and 1100 to 1300 then insert in intime column or
    update in outtime column and
    then 1600 to 1730 then to insert into intime column or else
    when intime is not null then update in outtime column
    I have tried and only insert id doing opver there Pls tell what wrong i have made
    declare
    t_in varchar2(25) := :bartime;
         t_out varchar2(25) := :bartime;
    -- t_date dail_att.attend_date%type;
    Begin
    go_block('TEST_SRI');
    FIRST_RECORD;
    LOOP
    if :bartime between 0145 and 0615 and t_out is null and t_in is not null then
    update dail_att set outtime = :bartime where barcode= :barcode
    and ATTEND_DATE = :BARDATE-1 ;
    elsif :bartime between 0630 and 1000 and t_in is null then
    insert into dail_att(barcode,intime,attend_date)
    values(:barcode,:bartime,:bardate);
    elsif :bartime between 0630 and 1000 and t_in is null then
    update dail_att set outtime = :bartime where barcode= :barcode
    and ATTEND_DATE = :BARDATE-1 ;
    elsif:bartime between 1130 and 1330 and t_in is null then
    insert into dail_att(barcode,intime,attend_date)
    values(:barcode,:bartime,:bardate);
    elsif :bartime between 1130 and 1330 and t_in is not null then
    insert into dail_att(barcode,intrtimein,attend_date)
    values(:barcode,:bartime,:bardate);
    elsif :bartime between 1615 and 1815 and t_in is null then
    insert into dail_att(barcode,intime,attend_date)
    values(:barcode,:bartime,:bardate);
    elsif :bartime between 1645 and 2000 and t_in is not null and t_out is null then
    update dail_att set outtime = :bartime
    where barcode= :barcode and outtime is null and ATTEND_DATE = :BARDATE-1;
    elsif :bartime between 2000 and 2200 and t_in is not null and t_out is null then
    update dail_att set outtime = :bartime
    where barcode= :barcode and outtime is null and ATTEND_DATE = :BARDATE;
    EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE' OR :BARCODE IS NULL;
    end if;
    NEXT_RECORD;
    --message('hai');
    END LOOP;
    delete from dail_att cascade;
    forms_ddl('commit');
    forms_ddl('truncate');
    exception
    when others then
    forms_ddl('rollback');
    message(sqlerrm||dbms_error_Text);
    message(sqlerrm||dbms_error_Text);
    End;      
    Regards
    Srikkanth.M

    I got it by converting by date time function
    Edited by: Srikkanth.M on Apr 10, 2010 2:19 PM

Maybe you are looking for

  • The weather Icon on trhe verizon homepage

    How do you set the weather Icon on the home page ,so it will stay where you set it?

  • How to Create a Texture in Muse

    Is there a way to create or get a texture for a solid color in muse?  My goal is to fill a box with a texture similar to the ones below. Thanks in advance.

  • SQL PLUS and socks

    I've tried to start sqlplus on NT4 with socks5 because my database server is outside a firewall. The socks works fine on my machine (I can telnet the port 1521 of the db server, or do a tnsping), but sqlplus cannot contact the db. Can you help me ? T

  • Memory Utilization not showing in Windows server

    Dear all, we have seen a situation in a SQL server 2008 r2 installed in windows 2008 R2. according to the resource monitor server uses 10 to 15 GB of memory but in resource explorer it shows as the total memory has utilized. is SQL load additional me

  • Creating slider to control current layer opacity in HTML?

    Hi! I wanted to create a slider in custom panel which changes the for eg opacity of the current layer. Here is what I used in HTML5 <div> <input type="range" min="0" max="100" value="0" step="1" id="opacity" name="opacity" onChange="sliderChange(this