SlideShare a Scribd company logo
What is SAP query and why do we need queries?
Many times a need arises for SAP Users and Functional Consultants to generate quick reports
without getting any ABAP coding done – time taken to complete the coding in development,
transport and test it in QA system and then transport to production – is sometimes too long. In
such cases, SAP query is a tool provided by SAP for generating these kinds of reports.
Purpose
 The SAP Query application is used to create reports not already contained in the default.
It has been designed for users with little or no knowledge of the SAP programming
language ABAP.
 SAP 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.
 These outputs can include lists on screens in table format, ALV grids, downloadable
spreadsheets, and downloadable flat files. The internal report generator creates an
ABAP program corresponding to the definition of the list.
The SAP Query comprises five components:
 Queries - SQ01
 InfoSet Query -
 InfoSets - SQ02
 User Groups - SQ03
 Translation/Query - SQ07
Query Areas
A query area contains a set of query objects (queries, Infoset, and user groups) that are discrete
and consistent.
There are the following query areas:
 Standard area
 Global area
Standard Area
1. Client specific
2. Query objects are not attached to the Workbench Organizer
Advantage:-End users can develop queries (ad-hoc reports) in their own client that are
not meant for use in the rest of the system.
Global Area
1. Cross client
2. Query objects are attached to workbench organizer
Advantage:-The global query area is well suited for centrally developing queries meant
for use and distribution throughout the system.
Steps to create a Query
Transaction – SQ02 (Infoset creation)
STEP 1:
Open Transaction SQ02. Create Infoset
STEP-2
Assign Data sources
1. Name
2. Authorization group: This means that only users authorized to execute programs
from this authorization group are able to execute these queries.
Use Tcode: AUTH_DISPLAY_OBJECTS to see Authorization Groups
3. Choose Data Source:
 Table join using a table: Is used when Query is prepared for retrieving data
from more than one database tables having relationships.
 Reading tables directly: Is used when Query is prepared for retrieving data
from one table.
 Logical databases: Is used when Query is prepared for retrieving data based
on a Logical database (LDB)
 Using programs to retrieve data: Here a program can be written with own
logic. Declaration in data section of the program will help the query to select
Create a infoset
or functionalarea
SQ02
Assignment of
user group to
infoset
SQ03
Creation of query
based on infoset
SQ01
the elements of data to be retrieved from database. As per the logic, data is
validated, processed. The selection screen can be prepared in Query and
data is retrieved for output.
4. Options
 No Automatic Text Recognition
 Fixed Point Arithmetic
In example here, we have selected Table join using basis table : SPFLI
The following screen will appear.
STEP-3
To join a table with this SPFLI table , Click on the button as shown in image below:
Add table SFLIGHT here.
The tables will automatically get joined to each other. Click on Infoset.
STEP-4
We will create empty field groups and Add fields as we want.
The two filedgroupswill be createdcorrespondingtotwotableswe selectedbefore.i.e SPFLI
and SFLIGHT.
STEP-5
1. Select a field group.
2. Select a field, right click and ad field to field group.
Repeat this step for as many field s you want in a field group. Also do same for second
field group.
STEP-6
Click Generate Button.
The Infoset ZMJ_INFOSET2 is generated.
Transaction – SQ03 (User group Creation)
STEP-1: Execute transaction SQ03 and create a USERGROUP
The USER GROUP will be saved.
STEP-2:Now on same transaction SQ03 , Mention the InfoSet as shown on screen.
Click assign users and InfoSets to a user group created.
STEP-3:On the next screen assign the users for the user group to whom you want to
give authorizations. Click Change authorizations to change the authorization.
Assign Infoset to users selected
STEP-4:
Select InfoSets to be assigns to user selected on previous screen.
Save user group.
The user group will be saved.
Transaction – SQ01 (Query Creation)
STEP 1: Execute transaction SQ01 to create a query.
Write a query name and create.
Select the InfoSet into which the query is to be created.
STEP 2:
Fill details and click Basic List.
Select the keys. You will see the data creating in Yellow circle.
Click test.
This is the output of SAP query made by us. 
Creating transactionusing ABAP Query
STEP 1:
Transaction SE93.
STEP 2:
STEP 3:
Execute 
OUTPUT :

More Related Content

PDF
Sap query creation and transport procedure in ecc6
PPT
The ABAP Query
DOC
Bankreconciliation ff67-130519130827-phpapp02
PDF
Using infoset query %2c sap query and quick viewer
PDF
PDF
Usgage of ABAP in BI
PDF
Using error stack and error dt ps in sap bi 7.0
PDF
Lo extraction part 4 update methods
Sap query creation and transport procedure in ecc6
The ABAP Query
Bankreconciliation ff67-130519130827-phpapp02
Using infoset query %2c sap query and quick viewer
Usgage of ABAP in BI
Using error stack and error dt ps in sap bi 7.0
Lo extraction part 4 update methods

What's hot (19)

PDF
How to write a routine for 0 calday in infopackage selection
PDF
Rda step by step
PDF
Lo extraction part 3 extractor logic
PDF
Lo extraction – part 5 sales and distribution (sd) datasource overview
PPT
SAP ADMINISTRATION
PDF
Lo extraction part 6 implementation methodology
PDF
Performance tuning in sap bi 7.0
PDF
Lo extraction part 2 database update logic
PDF
Sap basis certification_and_interview_questions_answers_and11237206714
PDF
Lo extraction part 7 enhancements
PDF
Lo extraction part 1 sd overview
PDF
How to create generic delta
PDF
How to run v3 job
PPTX
Analysis for office training
PDF
New dimensions for_reporting
PPTX
Installation And Administration of Pentaho
PDF
SAP BW connect db
PDF
Delta machenism with db connect
PDF
Practitioner perspective-erp-on-hana-and-fi-analytics 2015
How to write a routine for 0 calday in infopackage selection
Rda step by step
Lo extraction part 3 extractor logic
Lo extraction – part 5 sales and distribution (sd) datasource overview
SAP ADMINISTRATION
Lo extraction part 6 implementation methodology
Performance tuning in sap bi 7.0
Lo extraction part 2 database update logic
Sap basis certification_and_interview_questions_answers_and11237206714
Lo extraction part 7 enhancements
Lo extraction part 1 sd overview
How to create generic delta
How to run v3 job
Analysis for office training
New dimensions for_reporting
Installation And Administration of Pentaho
SAP BW connect db
Delta machenism with db connect
Practitioner perspective-erp-on-hana-and-fi-analytics 2015
Ad

Similar to Wiki sap query (20)

PPTX
Queries in SAP: Introduction
PDF
Sap query creation & transcation code creation for sap query
PDF
Abap query
DOCX
Sap mm query
PDF
Using infoset query ,sap query and quick viewer
PDF
SAP SD QUERY REPORT_GANESH
PDF
Abap query
PPTX
Access Chapter 02
DOCX
1 Week 6 - What Well Be Working On This Week In th.docx
PDF
Choosing Indexes For Performance
PPTX
Ms access
DOCX
Management of database information system
PPT
How Sap Quickviewer Helps Air Products And Chemicals With Sarbanes Oxley Comp...
PDF
Access 03
PPT
Sap business intelligence 4.0 report basic
PDF
Part_3._Retrieve data using query.pdfghff
PPTX
8.) ms-access_ppt-CA-course-itt-programme.pptx
PDF
Abap query
PPTX
Report Generation by Quick Viewer-SQVI.pptx
PPT
Querying a Database in Microsoft Access 2007
Queries in SAP: Introduction
Sap query creation & transcation code creation for sap query
Abap query
Sap mm query
Using infoset query ,sap query and quick viewer
SAP SD QUERY REPORT_GANESH
Abap query
Access Chapter 02
1 Week 6 - What Well Be Working On This Week In th.docx
Choosing Indexes For Performance
Ms access
Management of database information system
How Sap Quickviewer Helps Air Products And Chemicals With Sarbanes Oxley Comp...
Access 03
Sap business intelligence 4.0 report basic
Part_3._Retrieve data using query.pdfghff
8.) ms-access_ppt-CA-course-itt-programme.pptx
Abap query
Report Generation by Quick Viewer-SQVI.pptx
Querying a Database in Microsoft Access 2007
Ad

Recently uploaded (20)

PDF
Spectral efficient network and resource selection model in 5G networks
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Empathic Computing: Creating Shared Understanding
PDF
cuic standard and advanced reporting.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Approach and Philosophy of On baking technology
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Electronic commerce courselecture one. Pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
KodekX | Application Modernization Development
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
Spectral efficient network and resource selection model in 5G networks
NewMind AI Monthly Chronicles - July 2025
Empathic Computing: Creating Shared Understanding
cuic standard and advanced reporting.pdf
Encapsulation theory and applications.pdf
Approach and Philosophy of On baking technology
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Review of recent advances in non-invasive hemoglobin estimation
Electronic commerce courselecture one. Pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
KodekX | Application Modernization Development
Diabetes mellitus diagnosis method based random forest with bat algorithm
Big Data Technologies - Introduction.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
NewMind AI Weekly Chronicles - August'25 Week I
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Unlocking AI with Model Context Protocol (MCP)

Wiki sap query

  • 1. What is SAP query and why do we need queries? Many times a need arises for SAP Users and Functional Consultants to generate quick reports without getting any ABAP coding done – time taken to complete the coding in development, transport and test it in QA system and then transport to production – is sometimes too long. In such cases, SAP query is a tool provided by SAP for generating these kinds of reports. Purpose  The SAP Query application is used to create reports not already contained in the default. It has been designed for users with little or no knowledge of the SAP programming language ABAP.  SAP 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.  These outputs can include lists on screens in table format, ALV grids, downloadable spreadsheets, and downloadable flat files. The internal report generator creates an ABAP program corresponding to the definition of the list. The SAP Query comprises five components:  Queries - SQ01  InfoSet Query -  InfoSets - SQ02  User Groups - SQ03  Translation/Query - SQ07 Query Areas A query area contains a set of query objects (queries, Infoset, and user groups) that are discrete and consistent. There are the following query areas:  Standard area  Global area Standard Area 1. Client specific 2. Query objects are not attached to the Workbench Organizer Advantage:-End users can develop queries (ad-hoc reports) in their own client that are not meant for use in the rest of the system. Global Area
  • 2. 1. Cross client 2. Query objects are attached to workbench organizer Advantage:-The global query area is well suited for centrally developing queries meant for use and distribution throughout the system. Steps to create a Query Transaction – SQ02 (Infoset creation) STEP 1: Open Transaction SQ02. Create Infoset STEP-2 Assign Data sources 1. Name 2. Authorization group: This means that only users authorized to execute programs from this authorization group are able to execute these queries. Use Tcode: AUTH_DISPLAY_OBJECTS to see Authorization Groups 3. Choose Data Source:  Table join using a table: Is used when Query is prepared for retrieving data from more than one database tables having relationships.  Reading tables directly: Is used when Query is prepared for retrieving data from one table.  Logical databases: Is used when Query is prepared for retrieving data based on a Logical database (LDB)  Using programs to retrieve data: Here a program can be written with own logic. Declaration in data section of the program will help the query to select Create a infoset or functionalarea SQ02 Assignment of user group to infoset SQ03 Creation of query based on infoset SQ01
  • 3. the elements of data to be retrieved from database. As per the logic, data is validated, processed. The selection screen can be prepared in Query and data is retrieved for output. 4. Options  No Automatic Text Recognition  Fixed Point Arithmetic In example here, we have selected Table join using basis table : SPFLI The following screen will appear.
  • 4. STEP-3 To join a table with this SPFLI table , Click on the button as shown in image below: Add table SFLIGHT here. The tables will automatically get joined to each other. Click on Infoset.
  • 5. STEP-4 We will create empty field groups and Add fields as we want. The two filedgroupswill be createdcorrespondingtotwotableswe selectedbefore.i.e SPFLI and SFLIGHT. STEP-5 1. Select a field group. 2. Select a field, right click and ad field to field group. Repeat this step for as many field s you want in a field group. Also do same for second field group.
  • 6. STEP-6 Click Generate Button. The Infoset ZMJ_INFOSET2 is generated. Transaction – SQ03 (User group Creation) STEP-1: Execute transaction SQ03 and create a USERGROUP
  • 7. The USER GROUP will be saved. STEP-2:Now on same transaction SQ03 , Mention the InfoSet as shown on screen. Click assign users and InfoSets to a user group created. STEP-3:On the next screen assign the users for the user group to whom you want to give authorizations. Click Change authorizations to change the authorization.
  • 8. Assign Infoset to users selected STEP-4: Select InfoSets to be assigns to user selected on previous screen. Save user group.
  • 9. The user group will be saved. Transaction – SQ01 (Query Creation) STEP 1: Execute transaction SQ01 to create a query. Write a query name and create. Select the InfoSet into which the query is to be created.
  • 10. STEP 2: Fill details and click Basic List. Select the keys. You will see the data creating in Yellow circle.
  • 11. Click test. This is the output of SAP query made by us.  Creating transactionusing ABAP Query STEP 1: Transaction SE93.