There is a SAP Note 955295 - Using Survey Variables in SQL wich explains howto filter subqueries and send them to a variable defined with [%0] for example.
I tried in hana and I couldn't find the way to declare the variable did anyone tried that before.
Kind Regards,