cancel
Showing results for 
Search instead for 
Did you mean: 

using the Pause action block.

former_member246543
Participant
0 Kudos

Hi Mike and all,

I would like to know that whether using a Pause action block (or simply we can say like introducing a delay) inside a repeater/transaction is a standard approach or not?

In my case I am triggering the IDocs from ECC using MII transaction and the number of IDocs triggered depends upon the number of Plants configured in the database. so for say 50 plants I am getting around 350 IDocs triggered from ECC.

I also need to check that the number of IDocs triggered and the number of IDocs recieved is same. So in the same transaction which triggers the IDocs , I am calling another transaction which reads the IDocs and passing the value of the number of Idocs triggered to it.

So just to make sure that all the IDocs are received before I call the next transaction( which reads the IDocs) I am using a Pause action block. The time delay of the pause depends upon the number of IDocs(say 500 ms * No. of IDocs).

all my transaction interface is working fine. all I would like to know is that whether using such delay is a good practice or is there any other way round to ensure this from MII side.

Regards.

Sanjeev Sharma

Accepted Solutions (0)

Answers (1)

Answers (1)

agentry_src
Active Contributor
0 Kudos

Hi Sanjeev,

I have used Pause a few times in development, but only when I was troubleshooting. I never used it in a production environment, but that does not mean it should never be used. Just that I never had a good reason to do so.

If you are receiving your IDocs on a scheduled basis, you may want to schedule a job to run a little while after the download completes. Another option, if you are queuing up the IDocs, is to do a Message list query and count the number of documents in the message queue to make sure you have the required count. That could be put on a very quickly repeating schedule. You could also put in a While loop or a For Next loop and have a Pause within the loop, but also add in a break condition so you don't have the transaction run excessively (it might not matter, but I would suggest it as a good programming practice).

Regards,

Mike