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

Try catch - time out

Former Member
0 Likes
886

Hi all

I’m trying to create an idoc with FM 'IDOC_WRITE_AND_START_INBOUND' but so times im getting time out I would like to do try /catch prevent the time out .

I’m with difficulty to code the catch block can any one give some tips to catch the time out.

Thanks and regards



TRY.
  ...                       " TRY block (application coding)
'IDOC_WRITE_AND_START_INBOUND'  
CATCH cx_... cx_... ...
    ...                     " CATCH block (exception handler)
ENDTRY.

3 REPLIES 3
Read only

Former Member
0 Likes
583

Hi Luis,

If you use catch CX_ROOT it wil catch anything.

I suppose you have to call the 'IDOC_WRITE_AND_START_INBOUND' again in that catch block.

Regards,

Dirk.

Read only

Peter_Inotai
Active Contributor
0 Likes
583

Hi Luis,

I'm not sure if it's possible to catch time out, but might work with CX_ROOT.

You can also call SAPGUI_PROGRESS_INDICATOR after every idoc processing, which will reset the timer...however increase the network traffic. This approach is used in BD87.

Best regards,

Peter

Read only

0 Likes
583

I tried cx_root but it did not catch the time out error.

There was another solution suggested using asynchronous call but it won't work because I have to import parameters.

Apparently there is no way to catch this error.