Adhoc SAP Query and quickviewer reports starting with AQL4/AQ


SAP reports which have a name containing characters such as AQL4==, AQZZ==, !QL== etc. are created via the SAP tools such as Adhoc Query or QuickViewer. These allow you to create reports without the need for any ABAP coding. The Query tool is accessed via transaction SQ02/SQ01 and is similar to QuickView.(SQVI) but with many more features like being able to share created queries with other user or a group of users. 

Creating reports with the quickviewer (SQVI) 
SAP quickviewer is very simple to use and you can create a basic report very quickly by following the below steps: 
1. Execute t-code SQVI 
2. Enter a name and press the create button. (i.e. TEST) 
3. Within the following popup, enter a title and select the appropriate data source option (i.e. Table) 
4. Now enter a table name in the table/view field (i.e. EKKO) and press ok 
5. You then simply add the fields you want to be reported from the available fields list (right to left) 
6. Then save and execute. 
7. Creates report with name something like AQL4SYSTQV000144TEST========== 
8. This is obviously a very simple report and you could choose table join as the data source and join two tables together 


Creating Adhoc query report (SQ02, SQ01 and SQ03) 
Creating Query reports is a more complicated process but also more powerful. It involves building infosets within transaction SQ02, groups within SQ03 and then linking them together to create the actual query via SQ01. 

Transaction Code:

Once you have created your Query report you can then assign a transaction code to it in usual way 


Includes used within report:

Generated queries do not generally contain SAP includes just the generated ABAP code


Tables used within report and the associated select statement:

The database TABLES used within a SAP query report will be based on the tables you used to build the query via transactio SQ02