The error 'Runtime error RAISE_EXCEPTION has occurred' is received when attempting to execute a script using the Run mode despite working in Step By Step.
Transaction, Runner 10.X
SAP requires certain screens to be run in the foreground.
Check Launch GUI on the Run screen in 10.X, or Start SAP GUI in Studio 11.X, to enable the SAP GUI launch. If the Launch GUI button is checked and the error still occurs, record the script in Batch Mode and re-test the scenario.
We have seen instances where by the above does not resolve the issue, particularly with Custom Transactions. In this case you may require a different recording mode, possible GUI Scripting.