I'm trying to turn a query (defined in Query Designer) into its SQL statement on the fact table. In transaction RSRT a query can be run in debug mode and the SQL statement can be shown before the result of the query is displayed. I'm now searching for a way to get this SQL statement using ABAP. Who can help me with some code snippets or ideas how to solve this problem?
Thanks in advance.