Application Development and Automation 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: 
Read only

ENQUEUE* within DO...ENDDO

Former Member
0 Likes
535

Hello All,

I am doing the following.

DO.

CALL FUNCTION 'ENQUEUE_XYZ'

if sy-subrc <> 1.

exit.

endif.

ENDDO.

How can i best ensure that the DO...ENDDO is not endless.

and that after say 3 minutes i stop with some CX_ exception?

Thanks in advance.

Best Regards

Mahadevan

2 REPLIES 2
Read only

Former Member
0 Likes
414

Hi,

If you want to do it 1 times only then you can give


DO 1 times.
enddo.

If suppose enqueue function module is working fine then you have to do some set of statements then,


DO.
if sysubrc eq 0.
   statements.
   exit.
else.
  exit.
endif.
ENDDO.

Regards,

Nithya

Read only

former_member182354
Contributor
0 Likes
414

Hi Mahadevan,

Please use wait up to statement but remember that that will not set sy-subrc value and it will always be 0.

Raghav