I am working with 2 SAP sessions (/O-mode) and would like to transport a text from the /O-session to the first session using the "returnvalues" command. 
How can this be done?

You can use the Windows clipboard. For example, in the /O-session you use the script

copytext toText="t1" fromScreen="X[LONGTEXT_IVERM]"
copytext -toClipboard fromText="t1"
Returnvalues "OK:/0,process=set_text_from_clipboard.txt"

where the InputScript "set_text_from_clipboard.txt" is called in the first session:

copytext toText="t1" -fromClipboard