You are on page 1of 8

7/2/23, 1:39 PM ABAP Query Tutorial in SAP: SQ01, SQ02, SQ03

ABAP Query Tutorial in SAP: SQ01, SQ02, SQ03


By Scott Livingston Updated May 6, 2023

The ABAP Query application is used to create reports not already present in SAP
system. It has been designed for users with little or no knowledge of the ABAP
programming. ABAP Query offers users a broad range of ways to define reports and
create different types of reports such as basic lists, statistics, and ranked lists.

The ABAP Query comprises four components:

1. Queries
2. InfoSets
3. User Groups
4. Translation of Query

Lets look into them in detail:-

Queries
The Queries component is used by end users to maintain queries. One can create
queries,change queries and execute queries. Transaction SQ01

https://www.guru99.com/all-about-abap-query.html 1/8
7/2/23, 1:39 PM ABAP Query Tutorial in SAP: SQ01, SQ02, SQ03

InfoSets
InfoSets are special views of data sources. An InfoSet describes which fields of a
data source can be reported on in queries. An InfoSet can be assigned to several
roles or user groups.

Advantages–

By creating InfoSets and assigning them to roles or user groups, the system
administrator determines the range of reports that the individual application
departments or end-users are able to generate using the SAP Query.
End-users are able to work only with those InfoSets that are relevant to their
particular area, as designated by the role or user group that they are assigned
to.

USER Groups
The User Groups component is used to maintain user groups (from a security
standpoint).

Users working in the same application are assigned to the same user group.It does
not matter who actually defined a query in a user group. Every user assigned to the
user group is able to execute the query.

Users in a user group need to have the necessary authorizations before they are
able to change or redefine a query. Every user in a system can be assigned to
several user groups.

Translation/QUERY Component
A lot of texts are generated when defining queries, InfoSets, and user groups. These
texts are displayed in the language that we chose when we log on to the SAP
system.We can compare the text/languages using this component.

Data processing in Queries


Data can be processed and presented in 3 ways:-

https://www.guru99.com/all-about-abap-query.html 2/8
7/2/23, 1:39 PM ABAP Query Tutorial in SAP: SQ01, SQ02, SQ03

1. BASIC LIST – Presents data in the order defined by the functional area (
supports sorting and summation ).
2. STATISTIC – Shows the statistical figures calculated from the basic data.
3. RANKED LIST – A ranked list is a specialization of a statistic. E.x. Top ten
customers of a travel agency.

A query can have one basic list , upto nine statistics and upto nine ranked lists.

CREATING A QUERY
Step 1. Goto SQ01. Give a name to the query and click on the Create button.

Step 2. Give the description of the query in the next screen. Specify the output
length and select the processing option from the Further Processing Options box.
The data can be displayed in various formats such as table, download to a file, and
display in Word etc.

https://www.guru99.com/all-about-abap-query.html 3/8
7/2/23, 1:39 PM ABAP Query Tutorial in SAP: SQ01, SQ02, SQ03

Step 3. Click on the next screen, select the field group to be used.

Step 4. Click on the next screen, select the fields you want displayed

https://www.guru99.com/all-about-abap-query.html 4/8
7/2/23, 1:39 PM ABAP Query Tutorial in SAP: SQ01, SQ02, SQ03

Step 5. On the next screen, select the selection fields and then chose one of the
output types ( basic, statistics, ranked ).
In each of the lists, you can select various options.( eg. Sort order of fields, change
output length, column color,totals,page header, page footer etc.).

https://www.guru99.com/all-about-abap-query.html 5/8
7/2/23, 1:39 PM ABAP Query Tutorial in SAP: SQ01, SQ02, SQ03

Step 6. After providing all the above options you can save the query and execute it .

Note:

Transaction to Create/Maintain Infoset –SQ02


Transaction to Create/Maintain UserGroup –SQ03

You Might Like:


https://www.guru99.com/all-about-abap-query.html 6/8
7/2/23, 1:39 PM ABAP Query Tutorial in SAP: SQ01, SQ02, SQ03

SAP Scripts Tutorial: SE71, SE78, SCC1, VF03, SO10


SAP ABAP Programming Tutorials – Free Training Course
Top 35 SAP ABAP Interview Questions and Answers (2023)
SAP ABAP Tutorial PDF: Programming Examples for Beginners
What is SAP ABAP? Types, ABAP Full Form and Meaning

Prev Report a Bug Next

About
About Us
Advertise with Us
Write For Us
Contact Us

Career Suggestion
SAP Career Suggestion Tool
Software Testing as a Career

Interesting
eBook
Blog
Quiz
SAP eBook

Execute online
Execute Java Online
Execute Javascript
Execute HTML
Execute Python

https://www.guru99.com/all-about-abap-query.html 7/8
7/2/23, 1:39 PM ABAP Query Tutorial in SAP: SQ01, SQ02, SQ03

© Copyright - Guru99 2023         Privacy Policy  |  Affiliate


Disclaimer  |  ToS

https://www.guru99.com/all-about-abap-query.html 8/8

You might also like