‎2009 Aug 03 12:47 PM
Hi all,
After the below WAIT statement gets executed, I am getting sy-subrc = 4,
WAIT UNTIL 1 = 2 UP TO 10 SECONDS. " ACCEPTABLE IN VERSION 31H
I cannot use below statement as my version (31H) doesn't accept it:
WAIT UP TO 10 SECONDS. " NOT ACCEPTABLE IN VERSION 31H
I have checked the same statement WAIT UNTIL 1 = 2 UP TO 10 SECONDS. in ECC 6.0. but even there, it is NOT WORKING...!!!
Please suggest me what to do. My requirement is to STOP PROGRAM EXECUTION FOR 10 SECONDS
Thanks in advance
Vasu
‎2009 Aug 03 1:01 PM
"WAIT UNTIL log_exp UP TO sec SECONDS." waits until the logical expression is true OR every asynchronous call has been executed OR time elapsed.
If you did not execute any asynchronous call WAIT ends immediately and SY-SUBRC is set to 4.
Meanings of sy-subrc
0 The logical condition log_exp was fulfilled.
4 No asynchronous function calls exist.
8 With specification of the addition UP TO, the maximum time was exceeded.
In latest version the "WAIT UP TO sec SECONDS." can be used independently of any asynchronous call, but in 3.1H, look for FM containing WAIT or DELAY. (I don't have a 3.1H at hand)
- SWE_CD_TST_DELAY
- TH_DELAY_FUNC_TEST
- C14Z_WAIT_N_SECONDS
Regards,
Raymond
‎2009 Aug 03 12:57 PM
‎2009 Aug 03 1:08 PM
Function Module 'C14Z_WAIT_N_SECONDS' is working fine but is not available in my version. Please provide me any other alternative.
‎2009 Aug 03 1:01 PM
"WAIT UNTIL log_exp UP TO sec SECONDS." waits until the logical expression is true OR every asynchronous call has been executed OR time elapsed.
If you did not execute any asynchronous call WAIT ends immediately and SY-SUBRC is set to 4.
Meanings of sy-subrc
0 The logical condition log_exp was fulfilled.
4 No asynchronous function calls exist.
8 With specification of the addition UP TO, the maximum time was exceeded.
In latest version the "WAIT UP TO sec SECONDS." can be used independently of any asynchronous call, but in 3.1H, look for FM containing WAIT or DELAY. (I don't have a 3.1H at hand)
- SWE_CD_TST_DELAY
- TH_DELAY_FUNC_TEST
- C14Z_WAIT_N_SECONDS
Regards,
Raymond
‎2009 Aug 03 1:10 PM
I am using 'WAIT UNTIL 1 = 2 UP TO 10 SECONDS' after statement 'close dataset w_pgpcheckfile.'. Is it not valid?
‎2009 Aug 03 1:18 PM
There will be no "wait" time, look at [WAIT UNTIL|http://help.sap.com/abapdocu/en/ABAPWAIT_UNTIL.htm] and at [RFC - Remote Function Call in Release 3.0 |http://help.sap.com/abapdocu/en/ABENNEWS-30-RFC.htm#!ABAP_MODIFICATION_2@2@]
The WAIT UNTIL condition [UP TO n SECONDS] statement allows you to wait for a function module, called asynchronously, to finish. To do this, use the PERFORMING form ON END OF TASK addition. WAIT must occur in the same program context (session).
Regards,
Raymond
‎2009 Aug 03 1:35 PM
Hi Raymond,
I have copy pasted the code in FM SWE_CD_TST_DELAY and it worked in my version.... Thanks!!!
‎2009 Aug 03 1:30 PM
Hi Vasu,
sy-subrc = 4 => No asynchronous calls exist.
I guess, to use Until addition, u need a asynchrounous update to be happening...
as u dont have a wait upto x secs...
try using a loop...
do.
check start time.
lapsed time = current time - start time.
if lapsed time ge 10 secs.
exit.
enddo.
Regards,
Bikash
‎2009 Aug 03 1:39 PM
check this
link:[wait until|http://help.sap.com/saphelp_nwpi71/helpdata/en/c6/13a228e9c5ca469fe7065387dc87be/content.htm]