Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to do wait without "Wait up to..." ??

Former Member
0 Kudos

Hi experts,

the issue is a WAIT step, which is required after the execution of an RFC function call. The call to the external server requires some clean-up on that machine, for which i want to wait for let's say 10 seconds in the calling ABAP program. All this happens in a loop for typically some 10000+ repetitions.

First i have created a 'wait up to x seconds' ABAP line. After checking the keyword documentation of WAIT UP TO i am not sure if this may have too much impact on the database, because every execution of this WAIT will cause a Roll-In / Roll-Out and a DB commit action.

Are there any nice bits of coding you could make available here???

Many thanks in advance, i appreciate your helpful advice!

Cheers, Harry

6 REPLIES 6

former_member194669
Active Contributor
0 Kudos

Have you checked fm ENQUE_SLEEP ??

0 Kudos

Thanks! i was looking for something that could wait based on dates would be helpful.

0 Kudos

Whats your requirement. I think you can check the dates condition. then you can call wait command.

former_member182387
Active Participant
0 Kudos

Hi,

Simply you can try

DO X TIMES.
 " Without any logic inside
ENDDO.

Thanks and Regards,

Senthil Kumar Anantham.

karthik_vardhan
Explorer
0 Kudos

do .

// Check function module executed (RFC) Succsefully .

based on that condition .

if itab (o/p tab from RFC FM) <> initial .

exit .

else .

wait up to 1 sec .

endif .

enddo .

It may be helpful to U .

Former Member
0 Kudos

The last proposal appears quite helpful. Actually, we had solved the issue by implementing an asynchronous lookup functionality.

THX, Harry