Wait up to n seconds
Hi folks,
question regarding the abap wait-statement. If I say WAIT UP TO 5 SECONDS, the process is not occupied and then magically re-awakes after the specified 5 seconds.
During this time - do I have some chance to find the waiting program? Background is that I had an endless loop which I could not stop since it appeared for about half a second every 5 seconds in SM50, which was too short for me to stop or debug it.
Any hints appreciated. Cheers, Nils
Hi Nils,
WAIT interrrupts the process and issues an operating system SLEEP which makes the process invisible. If it's a batch job, you can cancel it. If it's online, use SM04, soubleclick the user and delete the user session.
And: Be aware that a SLEEP closes database cursors and works as an implicit commit. Any INSERTs, UPDATEs and DELETEs are commited to the database and can not be rolled back.
Regards
Clemens.
Similar Messages
-
Is there any other alternative instead of using of WAIT UP TO X SECONDS?
Hello
I am developing a inteface function module that gets iits input data from another system (HR system), in that I am using WAIT UP TO 5 SECONDS statement, but my lead is not OK for using it, pls. let me know can I achieve the same by using any other way? Bcz my lead said, it depends on the environement DEV / ACC / PRD, hence lead is not OK for that
Pls. let me know alternatives
Thank youPlease note the language of this site is professional English. Therefore please spell words out in full - because not bcz. Not everyone here's first language is English and abbreviations like this, besides being unprofessional, make your question harder to understand for them.
On to your question.
Why not ask your lead for an explanation and a solution? I.e. ask your lead for some leadership - it's his/her job!
Why are you needing to wait? What are you waiting for?
What I do is something like.
DO 20 TIMES. "or thirty or some configurable number of times
check for a condition being met - perhaps a lock being released.
if condition is met.
set a flag
exit loop.
endif.
wait 1 second
enddo.
if flag not set
issue error condition - resource not available or suchlike.
endif.
In this way, it doesn't matter what your environment is; as soon as the resource is available you're away. I agree with your lead that an arbitary wait is a bad thing. Even if you adjust the length for dev/q/prod, it can lead to difficulties - e.g. if your program ends up being called in a loop, that 5 seconds over a thousand iterations is a long delay. -
Where to position WAIT UP TO 1 SECONDS...
Hi guys,
Where does wait up to 1 seconds is positioned? is it before the COMMIT WORK or after teh COMMIT WORK?
Thanks so much..
Rgds,
MarkHi,
You can use wait statement.
LOOP AT ITAB.
PERFORM ...
WAIT UP TO 1 SECONDS.
ENDLOOP.
Refer
https://forums.sdn.sap.com/click.jspa?searchID=11560364&messageID=4819721
https://forums.sdn.sap.com/click.jspa?searchID=11560364&messageID=3806115
Regards
Kiran Sure -
Can i use wait up to 10000 seconds?
can i use wait up to 10000 seconds?
wht is the impact of the program ? efficeincy? possibility? etc etcHi Shahid,
What you are trying to do is impractical.There is a maximum time that a transaction can run.This is set by BASIS team.Typically it will be between 10 min and 1 hr.After which program terminates
Moreover this will be have adverse affects..Better schedule a job in background that runs once in 3 hrs...
Please reward if useful
Thanks Arjun -
hi,
my ipod 2nd gen on the 4.2.1 is not letting me download apps.
it says 'waiting' for a couple of seconds the disappears all of a sudden!
can someone please help?
thanksI tried it. I restored it 2 times, I also shut it off like 5 times. But it's still waiting and disapearing after 5 seconds.
-
Cannot pick up calls on wait, Cannot make a second call holding the first call
I have a really weird problem with my iPhone 5S. (iOS 7.1)
1. When I am on a call, I am not able to pick up a second call that is on wait. I can see the second call, I can hear the beep sounds but as soon as I pick up, the call freezes in 00.00 time, and My first caller is still active, not on hold.
2. When I am on a call, I am not able to make a second call placing the first call on hold. The second call disconnects immediately with 3 beeps.
3. I am able to see the incoming calls on wait, when I am already on a call. I am able to hear the beeps coming in. SO it means the call waiting is on (Tried turning it on/off/on too.) But when I pick up the call, the above problem comes in.
What have I tried to solve this: (None of them helped)
1. I tried a hard reset of my iPhone (Holding Power and Home button)
2. I tried toggling the Call waiting button
3. I tried resetting network settings.
4. I called my Operator for assistance. I am using Airtel, India. They told me to dial this code - *43# . I tried it and it gave me this screen. But the problem is not solved yet.
Is there anybody here who is facing the same issue with your iPhone? I never had this problem with my iPhone 4.Make sure you do not have "Do Not Disturb" turned on. This feature will block the first call, but is someone calls right back it will be put through.
On the iPhone, go to Settings/Do Not Disturb
Make sure you do not have Do Not Disturb turned on manual or scheduled. -
This is the first time on this pc I have installed the cc desktop, and when I logging in it waits for 10 seconds , then the message You've been signed out.
My username is [email protected]
please adviceFrankbergodal please utilize the steps listed in You are no longer signed into your Creative Cloud applications to resolve the current sign out error.
-
Plug in my ipod classic stays on Charging please wait for a few seconds then turns off
i plug it in on wall charger and computer and its says charging please wait for a couple of seconds and then the screen turns black dosent work for like a day the i plug it in after a day it does the same thing please help its a black ipod classic 120 gb
Have you tried charging it with another known working USB sync cable? After letting it sit to "charge" for at least 30 minutes, have you tried resetting the device by pressing and holding both the Select/Center and Menu buttons together long enough for the Apple logo to appear.
B-rock -
When it hangs, I end up having to "force quit" the application. I can't simply wait it out. No commands seem to respond when it is hanging. I run it on OS X, with all of the most recent software updates. My laptop is a Macbook Pro, most recent iteration.'''bold text'''
When it hangs, I end up having to "force quit" the application. I can't simply wait it out. No commands seem to respond when it is hanging. I run it on OS X, with all of the most recent software updates. My laptop is a Macbook Pro, most recent iteration.'''bold text'''
-
On FF 32 download panel freezes all downlaods at "wait a few more seconds" but they are done.
This started about a week ago. I upgraded to 32.0b8 to no avail.
I close and FF it tries again to re-download all previous download entries...
My add-ins are Download Helper and ABP. My AV is MSE. My PC is a 6gig core i5 Lenovo on Win7-64bit.
This has me puzzled, I run a tight configuration with no malware or toolbars etc.. and I have a good Cisco router with all DNS requests routed through OpenDNS family shield.
Note - After closing FF, I check Process Explorer to make sure it closed right and then run CCleaner. I restart FF and it immediately wants to re-download all files previously in the list... Even though before closing, i verified all files (some PDF's) were downloaded and intact. Also, the X icon in the download panel does nothing now... so after rebooting FF I can select a pending download and hit the delete key and that works... However this is getting old very quickly.. ;-)hello muzak24h, this appears to be a reproducible bug in the latest 32 beta 9 version.
a workaround for the moment would be to enter '''about:config''' into the firefox address bar (confirm the info message in case it shows up), right-click somewhere on the page and create a new string setting with the name '''browser.safebrowsing.appRepURL''' and value '''https://sb-ssl.google<i></i>.com/safebrowsing/clientreport/download?key=%GOOGLE_API_KEY%'''
for reference see [https://bugzilla.mozilla.org/show_bug.cgi?id=1057764 bug #1057764] (please don't post in bug reports, but vote for the bug if you want to see it fixed) -
How to avoid Wait upto 5 seconds
Dear Friends,
I have used the below code for generating the spool by submitting the standard program.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = lv_job_name
IMPORTING
jobcount = lv_job_nr
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc EQ 0.
SUBMIT RPCEDTX0
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS mstr_print_parms
USING SELECTION-SET 'ZPDF'
VIA JOB lv_job_name NUMBER lv_job_nr
AND RETURN.
IF sy-subrc = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = lv_job_nr
jobname = lv_job_name
strtimmed = 'X'
IMPORTING
job_was_released = lv_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 NE 0.
MESSAGE i162(00) WITH
'An error occured while closing the background job.'.
STOP.
ENDIF.
ENDIF.
WAIT UP TO 5 SECONDS .
*get job details
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
*eventid = gd_eventid
*eventparm = gd_eventparm
*external_program_active = gd_external_program_active
jobcount = lv_job_nr " gd_jobcount
jobname = lv_job_name "gd_jobname
*stepcount = gd_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.
* Get the spool number
SELECT * FROM tbtcp
INTO TABLE it_tbtcp
WHERE jobname = lv_job_name " gd_jobname
AND jobcount = lv_job_nr "gd_jobcount
* AND stepcount = gd_stepcount
* AND listident '0000000000'
ORDER BY jobname
jobcount.
*stepcount.
IF sy-subrc = 0.
READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
IF sy-subrc = 0.
gd_spool_nr = wa_tbtcp-listident. "gd_spool_nr --> contains spool no.
ENDIF.
ENDIF.
mi_rqident = gd_spool_nr .
*-- Convert Spool to PDF
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = mi_rqident
no_dialog = space
dst_device = mstr_print_parms-pdest
IMPORTING
pdf_bytecount = mi_bytecount
TABLES
pdf = mtab_pdf
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
Iam using in my program as WAIT UP TO 5 SECONDS , i dont want to use this option as i wanted to use a better way other than this way to increase the performance , please could anyone let me know what i can do.
If iam not using the WAIT UP TO 5 SECONDS then i found the spool no is not getting generated and there by iam getting an error as spool no found .
Please help me what is the better way of doing .
regards
divya
Formatted by: Vijay Babu Dudla on Apr 27, 2009 9:56 AMPlease use tags around source code in future postings.
Since you are using SUBMIT ... VIA JOB, control comes right back to your program and you don't know when the asynchronous job is finished and the spool data is available.
Do you need to schedule this as a job at all? If you use SUBMIT without VIA JOB, then control comes back when the called program is finished and you can read TSP01 right away (instead of TBTCP) to get the spool ID RQIDENT, using a unique RQ2NAME that you set in the SUBMIT ... LIST NAME ... addition.
Works for me
Thomas -
Send data via HTTP and wait 10 Seconds before sending next Message
Hi Folks,
I am doing an IDOC - XI - HTTP scenario.
after sending a message via the HTTP-receiver I have to wait up to 10 Seconds, before my partner accept the next Message.
Is there a way to configure the HTTP-receiver to wait?
Thanks,
ChrisHi Chris,
You can use ccBPM for this scenario.
Scenario 1 :
1 IDOC contains multiple records, so you can convert to multiline items.
Loop base on the multiline items (Block Step).
Send Step for sending http request.
wait step to wait for 10 seconds.
Scenario 2 :
1 IDOC contains only single record. so you need to collect the IDOC until certain time.
Loop base on the multiline items (Block Step).
Send Step for sending http request.
wait step to wait for 10 seconds.
Regards
Fernand -
HttpWebRequest needs to wait 5 seconds to work properly in PUT method
I am trying to use an API and I don't have any problems with GET and POST but PUT isn't working. I tried with a lot of different examples and finally by chance I discovered that waiting more that 5 seconds (with 5000ms it is not working and with 5100ms it does)
it starts working properly. But why is that happening? And how can I avoid this? 5 seconds for each registry update is to much waiting and I really don't understand why POST works well without waiting and PUT needs 5 seconds to work.
Here I put the method that I am using with the Thread.Sleep(5100).
As I said without this line when I make WebResponse
response = request.GetResponse(); gives me an error.
public void call(string url, object jsonObj)
try
// Create a request using a URL that can receive a post.
HttpWebRequest request = (HttpWebRequest) HttpWebRequest.Create(urlSplio);
// Create POST data and convert it to a byte array.
request.Method = "PUT";
// Set the ContentType property of the WebRequest.
request.ContentType = "application/json";
request.Credentials = new NetworkCredential(WebConfigurationManager.AppSettings["User"], "WebConfigurationManager.AppSettings["Key"]");
string json = JsonConvert.SerializeObject(jsonObj);
byte[] byteArray = Encoding.UTF8.GetBytes(json);
// Set the ContentLength property of the WebRequest.
request.ContentLength = byteArray.Length;
// Get the request stream.
Stream dataStream = request.GetRequestStream();
// Write the data to the request stream.
dataStream.Write(byteArray, 0, byteArray.Length);
// Close the Stream object.
dataStream.Close();
Thread.Sleep(5100);
// Get the response.
WebResponse response = request.GetResponse();
// Display the status.
Console.WriteLine(((HttpWebResponse)response).StatusDescription);
// Get the stream containing content returned by the server.
dataStream = response.GetResponseStream();
// Open the stream using a StreamReader for easy access.
StreamReader reader = new StreamReader(dataStream);
// Read the content.
string responseFromServer = reader.ReadToEnd();
// Display the content.
Console.WriteLine(responseFromServer);
// Clean up the streams.
dataStream.Close();
response.Close();
catch (Exception ex)Perhaps there are some artificial delays, such as Thread.Sleep(5000), accidentally left in the provider’s code for testing purposes.
In some of technologies, the server functions should have certain special attributes, such as [WebInvoke(Method = "PUT")]. Check if this is the case, with providers. -
Wait upto one second v/s BAPI TRANSACTION COMMIT
Hi All,
I calling the FM BAPI_EQUI_CHANGE and then CALL FUNCTION 'BAPI_TRANSACTION_COMMIT 'EXPORTING wait = 'X'.
But it seems like in the production environment the commit does not happen immediately and happens only when I add a "wait upto one second" statement. I want to avoid the wait and also a bit confused on why the commit BAPI does not work quickly enough. PLease enlightenme on this.
Best REgards,
Shankar.BAPI_TRANSACTION_COMMIT executes
- a COMMIT WORK, so it starts update task, if WAIT specified, it waits until task are ended, and execute a database commit (native SQL commit on database server)
- a buffer refresh of the BAPI tools only not of the whole database on server...
There can nevertheless be some delay due to database server even if database commit is required it may take time and Abap don't wait at this step, so even a WAIT UP TO n SECONDS can fail ( So [it will happen|http://en.wikipedia.org/wiki/Murphy%27s_law]). If you want to actually be sure that database is updated, you must execute a SELECT from database[ BYPASSING BUFFER|http://help.sap.com/abapdocu_70/en/ABAPFROM_CLAUSE.htm#&ABAP_ADDITION_3@3@] in a DO/ENDDO loop to insure data is created/updated (Of course put a limit at the number of tries performed)
Regards,
Raymond -
Windows Speech Recognition Macros - Wait for Second Command
Hello all. 'm terribly sorry if this was posted in the wrong forum. Let me know where to put it and I'll move it accordingly.
I'm working with Windows Speech Recognition Macros, and I've got a question. Is there ANY way to write a macro that is triggered when the user says something (<listenFor></listenFor>), has the computer say something back to the user (<speak></speak>)
and then waits a number of seconds for a specific command from the user? An example of what I'm saying would be something like....
(I named my computer Aurora)
ME: Aurora, close all windows.
AURORA: Command received. Confirming close all windows.
*WAIT*
ME: Confirm.
AURORA: Command confirmed. Closing all windows.
or something along those lines to create some sort of dialogue between the computer and I. Is this acheiveable through the use of Speech Recognition Macros, or would I need to design a program that integrates Windows Speech Recognition to do this (if so,
point me in the right direction)? Or worse, am I asking too much from a simple Speech Recognition program?I'm working with Windows Speech Recognition Macros, and I've got a question. Is there ANY way to write a macro that is triggered when the user says something (<listenFor></listenFor>), has the computer say something back to the user (<speak></speak>)
and then waits a number of seconds for a specific command from the user? An example of what I'm saying would be something like....or something along those lines to create some sort of dialogue between the computer and I. Is this acheiveable through the
use of Speech Recognition Macros, or would I need to design a program that integrates Windows Speech Recognition to do this (if so, point me in the right direction)? Or worse, am I asking too much from a simple Speech Recognition program?
If you are asking if you can add wait commands to WSRMacros I do not see why you need a separate program. The Toolkit developed for WSR allows easy creation of WSRMacros and nesting of multiple macros using the Pause Execution command which inserts
your choice of the length of the Wait state.
For writing your own Wait state command, see the MSDN article on the Wait state command. I tried inserting the link but it won't activate because my account has not yet been approved.
Marty Markoe
2010-2011 Microsoft MVP
Maybe you are looking for
-
How to force multiple columns in the Details section
Hello, My report has a lot of data in the Details section, but it could fit on one page if I could put it in three columns. Is there a way to do this? The Details section has setting: Force the new page after certain number of visible records. This w
-
Hi, can I charge my iPod Touch with my iPad2 outlet charger?
Hi, can I use the ipad2 outlet charger to charge iPod touch?
-
Vintage crop available in Photoshop Elements?
I'm looking for a way to produce a soft oval crop of the kind often seen in original old sepia photographs - commonly in portraits. Is there a function in PS Elements which will allow me to achieve this effect? (or any other software package out th
-
Getting descriptor version does not match runtime version error
Thanks, I am Using Adope Air SDK2.0 and Runtime Air 1.0.7, i have created one HelloWorld application using Adope sample code. When i am trying to run this using commands : i have used : adl HelloWorld.html i am getting this error: invalid application
-
Will I be able to apply the Adobe Photoshop Classroom in a book (CC) to my Photoshop CS6 Deisgn standard? The CIB for Photoshop CC is on sale. Thanks anyone