Sometimes it is necessary to wait for an SAP background operation. This post briefly explains how this can be realized. This is very easy to implement with the sapReadyState attribute in a loop.
As we can see here we have a simple do-while loop that is executed as long as the sapReadyState is false. Additionally a delay activity is included to save resources. That’s all.
If a timeout is still needed, this can also be inserted quite simply by an if-condition with a break.
With this approach we have the possibility to wait for SAP background operations according to our requirements.