6 reasons to use the query functionality in SAP R/3 or SAP:
1. It is delivered with SAP
2. It is available across all modules
3. It is easy to teach users to write their own reports
4. It requires minimal configuration
5. Security is built-in — no hard-coding
6. No ABAP programming skills required
2. 08/11/2019 2
Queries in SAP
Introduction
How does the InfoSet query functionality work?
How to create an InfoSet query?
Attention points
3. 08/11/2019 3
Introduction
• In SAP R/3 and SAP ECC different reporting tools exist to create reports
directly in the ERP environment without coding.
• As from SAP S/4HANA the reporting framework changes and other reporting
tools are available.
Capabilities InfoSet Query
Drilldown
Reporting
Report Painter /
Writer
Available for all SAP modules +++ + ++
Easy to create +++ + +++
User-friendly ++ + +++
Interactive report output +++ +
Formatting possibilities ++ +++
Integration with MS products +++ +++ +++
4. 08/11/2019 4
Introduction
• 6 reasons to use the query functionality in SAP R/3 or SAP:
It is delivered with SAP
It is available across all modules
It is easy to teach users to write their own reports
It requires minimal configuration
Security is built-in — no hard-coding
No ABAP programming skills required
5. 08/11/2019 5
Introduction
• Useful transactions:
SQ03: SAP Query - Maintain user groups
SQ02: SAP Query - Maintain InfoSet
SQ01: SAP Query - Maintain queries
SE93: Transaction codes
SE11: Dictionary - Tables
SE16(N): General Table Display
7. 08/11/2019 7
How to create an InfoSet query?
Proper configuration of these components consists of the following six steps:
1. Determine your administration strategy
2. Decide which application area to use for developing reports
3. Create user groups to organize reports
4. Create InfoSet
5. Create query
6. Create transaction code (if required)
8. 08/11/2019 8
Step 1: Determine your administration strategy
• The first step in configuring the query functionality is to determine where
users can develop and create queries.
1. Configure and enable its use in the live production environment
2. Configure and enable its use only in a development client
3. A little bit of both
• Best practice: queries are always created in the development environment
and transported. All queries need to be tested in staging with special
attention to performance issues!
9. 08/11/2019 9
Step 2: Decide which application area to use for
developing reports
• 2 application areas exist…
Global application area: queries that are created in the global
application area appear in all clients that reside on a database server.
Standard application area: in contrast, the standard application area
is client-specific.
If you want to assign a transaction code to your query, create your
query in the standard application area.
10. 08/11/2019 10
Step 3: Create user groups to organise reports
• The concept of a user group allows you to organise reports by segregating
a group of related business users from all other business users for
reporting purposes.
• In other words, everyone in a particular department creates reports in the
same area within SAP, which is called a user group.
• User Groups are maintained using the transaction code SQ03.
11. 08/11/2019 11
Step 4: Create InfoSet
• InfoSets are data sources used in getting the data for SAP reports. Such
data sources are evaluated in queries.
• InfoSets are allocated to a user group; the members of a group can access
the InfoSet to which the group is allocated.
• InfoSets are maintained using the transaction code SQ02.
12. 08/11/2019 12
Step 4: Create InfoSet (cont’d)
A table join includes several tables
that are read by SELECT statements.
Specify the name of the table that
you want to use to start the join
definition. You can choose more
tables later.
The data is read directly from a
single table.
A logical database is a method by
which ABAP programs read and
process data. The sequence in
which the data is supplied to the
programs is determined by a tree
structure.
16. 08/11/2019 16
Step 5: Create Query
• A query is a tool used to create lists using data available for analysis
purposes in InfoSet.
• Queries are assigned to InfoSet and user group(s).
• A query is created and maintained using the transaction code SQ01.
21. 08/11/2019 21
Step 6: Create transaction code
• There are two options for executing queries…
1. Execute query from transaction SQ01
Not really user-friendly
2. Create custom transaction code to query
Authorisations need to be updated
22. 08/11/2019 22
Step 6: Create transaction code
A new transaction code can be created using transaction SE93
24. 08/11/2019 24
Attention points
Performance of queries needs to be checked before transporting new reports
to production !
Simple lists with limited or no formatting !
Be careful with reports on transactional data !