Thomas' answer is the right one for your subject question: if you must use an UNION to retrieve data and add it to an internal table, you should proceed with TWO select's using INTO TABLE and APPENDING TABLE clauses.
If you want to know if your whole SQL is possible in ABAP, I fear it's not. The use of some functions in the SELECT or WHERE clauses are restricted. You shall find a way to simulate them with some sort of post-processing (I mean: retrieve the full data with the INTO/APPENDING and then to use a LOOP to modify your data (trim = CONDENSE) and/or delete it.