Hello Kristian,
depending on the database version you are using you have to increase the following parameters:
MaxDB <= 7.6.04 -> _WORKSTACK_SIZE to max. 32768 Bytes
MaxDB >= 7.605 -> _WORKSTACK_SIZE = to max. 262136 Bytes
MaxDB <= 7.7.04.23 -> InterpreterWorkStackSize = 32768 Bytes
MaxDB >= 7.7.04.24 and 7.8 and 7.9 -> InterpreterWorkStackSize = 262136 Bytes
This should solve the problem.
Regards, Christiane