References are not allowed in a SAP remote function call

You are trying to make use of references but you should be aware that it is accessible only with the same stack and in your case, it is not. You are creating a remote function module and here references will not work. So, you should be going with parameters as ‘pass by value’ instead of ‘pass by reference’.