SlideShare a Scribd company logo
1 of 13
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

What's hot

Rda step by step
Rda   step by stepRda   step by step
Rda step by step
Phani Kumar
 
Lo extraction part 3 extractor logic
Lo extraction   part 3 extractor logicLo extraction   part 3 extractor logic
Lo extraction part 3 extractor logic
JNTU University
 
Lo extraction – part 5 sales and distribution (sd) datasource overview
Lo extraction – part 5  sales and distribution (sd) datasource overviewLo extraction – part 5  sales and distribution (sd) datasource overview
Lo extraction – part 5 sales and distribution (sd) datasource overview
JNTU University
 
Lo extraction part 6 implementation methodology
Lo extraction   part 6 implementation methodologyLo extraction   part 6 implementation methodology
Lo extraction part 6 implementation methodology
JNTU University
 
Performance tuning in sap bi 7.0
Performance tuning in sap bi 7.0Performance tuning in sap bi 7.0
Performance tuning in sap bi 7.0
gireesho
 
Lo extraction part 2 database update logic
Lo extraction   part 2 database update logicLo extraction   part 2 database update logic
Lo extraction part 2 database update logic
JNTU University
 
Sap basis certification_and_interview_questions_answers_and11237206714
Sap basis certification_and_interview_questions_answers_and11237206714Sap basis certification_and_interview_questions_answers_and11237206714
Sap basis certification_and_interview_questions_answers_and11237206714
ramesh469
 
Lo extraction part 7 enhancements
Lo extraction   part 7 enhancementsLo extraction   part 7 enhancements
Lo extraction part 7 enhancements
JNTU University
 
Lo extraction part 1 sd overview
Lo extraction   part 1 sd overviewLo extraction   part 1 sd overview
Lo extraction part 1 sd overview
JNTU University
 
How to create generic delta
How to create generic deltaHow to create generic delta
How to create generic delta
Jacques Kalees
 

What's hot (19)

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

Similar to Wiki sap query

Lecture16 abap on line
Lecture16 abap on lineLecture16 abap on line
Lecture16 abap on line
Milind Patil
 
W2 k3 ad_integration-how_to
W2 k3 ad_integration-how_toW2 k3 ad_integration-how_to
W2 k3 ad_integration-how_to
Meka SriHari
 
Final Internship Presentation
Final Internship PresentationFinal Internship Presentation
Final Internship Presentation
Thekra Alqaeed
 
How to broadcast a b ex report through e
How to broadcast a b ex report through eHow to broadcast a b ex report through e
How to broadcast a b ex report through e
Zaynab Fadlallah
 
Abap query
Abap queryAbap query
Abap query
vvnalla
 

Similar to Wiki sap query (20)

Sap query creation & transcation code creation for sap query
Sap query creation & transcation code creation for sap querySap query creation & transcation code creation for sap query
Sap query creation & transcation code creation for sap query
 
SAP BASIS Training in Chennai
SAP BASIS Training in ChennaiSAP BASIS Training in Chennai
SAP BASIS Training in Chennai
 
Using infoset query ,sap query and quick viewer
Using infoset query ,sap query and quick viewerUsing infoset query ,sap query and quick viewer
Using infoset query ,sap query and quick viewer
 
Lecture16 abap on line
Lecture16 abap on lineLecture16 abap on line
Lecture16 abap on line
 
W2 k3 ad_integration-how_to
W2 k3 ad_integration-how_toW2 k3 ad_integration-how_to
W2 k3 ad_integration-how_to
 
SAP SD QUERY REPORT_GANESH
SAP SD QUERY REPORT_GANESHSAP SD QUERY REPORT_GANESH
SAP SD QUERY REPORT_GANESH
 
Pnbhfl training final
Pnbhfl training finalPnbhfl training final
Pnbhfl training final
 
Project report
Project report Project report
Project report
 
Final Internship Presentation
Final Internship PresentationFinal Internship Presentation
Final Internship Presentation
 
Jaspersoft and Clarity PPM - Advanced Reporting with Data Warehouse
Jaspersoft and Clarity PPM - Advanced Reporting with Data WarehouseJaspersoft and Clarity PPM - Advanced Reporting with Data Warehouse
Jaspersoft and Clarity PPM - Advanced Reporting with Data Warehouse
 
Job portal
Job portalJob portal
Job portal
 
Abap interview questions and answers
Abap interview questions and answersAbap interview questions and answers
Abap interview questions and answers
 
How to broadcast a b ex report through e
How to broadcast a b ex report through eHow to broadcast a b ex report through e
How to broadcast a b ex report through e
 
Sap basis made_easy321761331053730
Sap basis made_easy321761331053730Sap basis made_easy321761331053730
Sap basis made_easy321761331053730
 
Data Warehouses & Deployment By Ankita dubey
Data Warehouses & Deployment By Ankita dubeyData Warehouses & Deployment By Ankita dubey
Data Warehouses & Deployment By Ankita dubey
 
Sure Outputs
Sure OutputsSure Outputs
Sure Outputs
 
How to develop a gateway service using code based implementation
How to develop a gateway service using code based implementationHow to develop a gateway service using code based implementation
How to develop a gateway service using code based implementation
 
Exclusive SAP Basis Training Book | www.sapdocs.info
Exclusive SAP Basis Training Book | www.sapdocs.infoExclusive SAP Basis Training Book | www.sapdocs.info
Exclusive SAP Basis Training Book | www.sapdocs.info
 
10 Steps for Customizing a Web App
10 Steps for Customizing a Web App10 Steps for Customizing a Web App
10 Steps for Customizing a Web App
 
Abap query
Abap queryAbap query
Abap query
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

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.