How to assign a transaction code to a QuickViewer query (SQVI) in SAP ECC

1. Go to SQVI t code and enter your query name and press enter
2. In the menu path select Quick view–> additional functions–>Generate Program
3. After Generating the program In the menu path select Quick view–> additional functions–>Display report Name
4. Now in se38 enter the report name in Program field and execute
5. You will get the Initial Selection screen of the report . Go to Menu of System –>Status
6. Note down the Program name and Screen number
7. Go to SE93 and Create a Z tcode for the query, Enter the description and importantly you have to select the 2nd Option radio Button Program and Selection Screen (Report Transaction) and Press enter
8. In the next screen enter the Report name In Program field and enter the screen number
9. In the classification Section select Professional user Transaction
10. In GUI support section select all the options i.e SAPGUI for HTML,Java,Windows

Source:
SCN dicussion “Transaction Code assignment for Query created in SQVI” https://scn.sap.com/thread/1893603