2004 Apr 02 7:05 AM
Hello all
<b>Thomas Jung</b> wrote in an earlier posting about WAIT:
The big advantage it has is that it release the dialog work process while the program is waiting.
Are there any disadvantages ?
Best regards
Thomas Madsen Nielsen
2004 Apr 02 9:56 PM
2004 Apr 02 10:36 AM
Yes, it makes the program run longer!
Seriously, none to my knowledge. We use it to allow an external job monitor to monitor the progress of an ABAP that schedules other jobs dynamically.
The external monitor knows about job A, but not jobs B and C that A spawns. So instead, job A uses the WAIT statement to periodically wait for the completion of jobs B and C. Seems to work very well.
Scott
2004 Apr 02 9:56 PM
2004 Apr 05 10:25 AM
I believe that only the WAIT UNTIL variant of the WAIT statement was designed for asynchronous RFC. There are no documented restricted uses of WAIT UP TO n SECONDS that I can see.
Scott
2004 Apr 05 2:16 PM
The following is from the on-line help in our 46C system:
Notes
WAIT should only be used with asynchronous Remote Function Calls (CALL FUNCTION func ...STARTING NEW TASK task name) and the addition PERFORMING form ON END OF TASK. It has no effect in other environments.
Since the ABAP debugger has its own internal flow logic (just like related roll area changes), this can have a considerable effect on the execution of the WAIT statement in debugging mode.
2004 Apr 05 2:21 PM
Yes, I saw that documentation too, however it is a note for the variant WAIT UNTIL <logical expression> only.
It makes perfect sense there, because only a parallel thread invoked by asynchronous remote function call could update the flag typically used in such a logical expression.
There are no such restrictions regarding WAIT UP TO n SECONDS.
Scott