At first sight I'd guess that the result set you try to materialize here is simply too large for your SAP HANA system.
In the SQL console you usually only see the first 1000 records (or whatever you set the limit to) - but most often not the full resultset.
Why do you store the data in a temp table anyhow? Wouldn't a table variable not be sufficient?
- Lars