SlideShare a Scribd company logo
ABAP Query


Published by Team of SAP Consultants at
             SAPTOPJOBS
        www.sap-topjobs.com


         Copyright 2005@SAPTOPJOBS



All rights reserved. No part of this publication may be reproduced, stored in a
retrieval system, or transmitted in any form, or by any means electronic or
mechanical including photocopying, recording or any information storage and
retrieval system without permission in writing from SAPTOPJOBS.
TABLE OF CONTENT

INTRODUCTION ..................................................................................................3
Scenario 1.............................................................................................................4
1. Finding Database tables for creating queries.................................................4
2. Create a User group ....................................................................................19
3. Create an Infoset .........................................................................................27
4. Assign Infoset to User Group.......................................................................39
5. Create Query ...............................................................................................41
Scenario 2...........................................................................................................64
1. Creating an Infoset ......................................................................................65
2. Assign Infoset to User group........................................................................86
3. Create a Query ............................................................................................88
4. Transporting Queries .................................................................................108
INTRODUCTION

In every project we come across situations where the client is not satisfied by the
standard SAP reports. In such situations most of the times functional consultants
have to be at the mercy of ABAPERS. This not only costs time but also a good
deal of money for the client.

ABAP Query was a blessing in disguise for both functional SAP consultants as
well as end users of the company. Here, one could easily design various reports
without any technical knowledge. Functional consultants will find this tool very
useful and an added skill in today multi tasking environment.

We have attempted to bring you meat of ABAP query in this document. I am sure
you would find this very useful in your current job as a consultant or a end user.
Scenario 1

  1. Finding Database tables for creating queries
  We want to view the company code segment of the entire customer masters
  in the company. Standard reports available do not give the desired
  information. Therefore we feel the need to create an ABAP Query.

  To create an ABAP query you need to know the database table where the
  information exists.

  How can that be obtained?

  Option 1

  We want to see the company code information of a customer.
  Use the relevant transaction code to see the information. In this case it is
  FD03

  Go to the company code data
Position the cursor on the field Recon. account   and press function
key F1 on the key board to see the field help.
Click on Technical info
Thus you get the Transparent table name – KNB1

Here you have easily got the table.

Option 2

Sometimes the table name is not as easily available as was available in
option 1.

In the same transaction
Click on
Click on the field Name   and now again press function key F1 on
the keyboard
Click on
In the above screen transparent table is not visible.

Note down the field name NAME1

In another session type in transaction code SE90 in the command field.
Click
Click




Click
Double click
Update the following:-
Click
Click   down to find where customer table for general data appears
We will use the table KNA1 for General data in Customer Master.
2. Create a User group
Use the following path:-

SAP menu à Tools à ABAP Workbench à Utilities à SAP Query à SQ01
Queries




Click
Abap query
Update the following:-
Click
Update the following:-




Click


Assign users to the user group. You need to assign the users of the particular
department to the user group.

Click on
You will update the relevant users who will be using these queries.
Click
Click on




Click
3. Create an Infoset
Click Environment à Infosets
Update the following:-
Click
Click

Update the following:-
Click




Click
Click
Click
You will notice in the above screen that some fields have T above them



This means that in this field text is also available.

Now we need to select fields from the table (left hand side) to the Field
Group/data fields (right hand side).

Position the cursor on

Then position the cursor on
Click on Insert field(s) in field group
Click

Hold the Ctrl key on the keyboard and select other fields also




By clicking
Click
Click

Click     to generate the infoset

The infoset is now ready to use in the query.

Click
4. Assign Infoset to User Group

Update the following:-




Click
Select


Click



Click
5. Create Query
Here we maintain the source fields which are to be updated with the data.




Click   to select user group
Select

Click
Update the following:-




Click
Click

Click
Update the following:-
Click
Select

Click
Update the following:-
Click
Abap query
Click
Update the following:-
Click

Click
Click
Double click




Click
Double click

Similarly double click other fields to select
Click
Update the following:-




Click




Click
Update the following:-
In the above you screen shot you see that the Customer text is being showing as
Customer number. We need to change this.

Click    twice
Click




Click                the field will open up
Change it to Customer Name
Click on




Click
Click




Click


Click on

Click      until you reach
Now you can execute this query

By selecting




Click




Scenario 2
In scenario 1 we saw a simple query, where in all information required was
available in a single table.

But that is not the case always. Information which we require is not available in a
single table and is scattered across in more than one table. In such as scenario
you need to create a join between these tables through a common field between
these tables.

In this scenario we want to have information of the customer master with name,
address and also the accounting information.

We have seen earlier that the customer address information is available in the
table KNA1 and the accounting information for the customer is available in the
table KNB1. These 2 tables can be joined based on the common field customer
number in them.
Let us proceed with creating a new query

    1. Creating an Infoset




Update the following:-
Click
Update the following:-




Click
Click




Update the following:-




Click
Click




Click
Click

Click




Select
Click on Settings à Settings

Click
Select




Now click
Click
Position the cursor on

Click Undo relationship
Click

Click
Now Update the following:-
Click
Click
Click
Click
Click

Click
Click

Thereafter select all the fields you want to move on the right side.

Press the Ctrl button to select more than one field.




Click


Click
Click   until you will see

Select the following fields
Select




Click
Click




Click on

Click

Click



Click
2. Assign Infoset to User group




Click
Select


Click on

Click      twice
3. Create a Query

Click Other user group




Click

Click
Click
Uncheck




Update the following:-




Click
Click
Update the following:-
Click
Select




Click
Select
Click
Click
Abap query
Click
Update the following:-
Click
Abap query
Click
Abap query
Click
Click
Click      twice


Click on

Click      thrice




To execute a query

Select


And then Click
4. Transporting Queries
Click
Abap query
Update the following:-
Abap query
Click



Click
Click
Click

More Related Content

PDF
Sap short cuts
PDF
Abap sap 101_beginners_2_04
 
PPT
Excel for beginners class 1
PPTX
Gl13 m6-c1-presentation
PDF
The ultimate-guide-to-sql
PPTX
PPTX
Gl2010 m6 ex1-presentation
PPT
Excel for beginners class 3
Sap short cuts
Abap sap 101_beginners_2_04
 
Excel for beginners class 1
Gl13 m6-c1-presentation
The ultimate-guide-to-sql
Gl2010 m6 ex1-presentation
Excel for beginners class 3

What's hot (20)

PDF
Excel Printing Tips2007
PPTX
managerial computing
PDF
Microsoft word -_microsoft_word_exercise
PDF
Office productivity tools (part ii) (5.71 mb)
PDF
Office productivity tools (part ii) (2.74 mb)
DOCX
Word excel
PPT
Beginner word class_2
ODP
Guide lines
DOC
Basic interview questions for skills tests
PDF
Office productivity tools (part i) (3.13 mb)
PDF
Pks ms excel unit 2_bcomcs
DOCX
Learn excel
PPT
Beginner word class_4
DOCX
Final Printer Manual
PDF
Welcome to word template
PDF
Pks ms word unit 1_bcomcs
PPT
Excel for beginners class 4
PDF
Zebra sap-smartforms-solution
PPTX
Excel ch10
Excel Printing Tips2007
managerial computing
Microsoft word -_microsoft_word_exercise
Office productivity tools (part ii) (5.71 mb)
Office productivity tools (part ii) (2.74 mb)
Word excel
Beginner word class_2
Guide lines
Basic interview questions for skills tests
Office productivity tools (part i) (3.13 mb)
Pks ms excel unit 2_bcomcs
Learn excel
Beginner word class_4
Final Printer Manual
Welcome to word template
Pks ms word unit 1_bcomcs
Excel for beginners class 4
Zebra sap-smartforms-solution
Excel ch10
Ad

Viewers also liked (20)

PPT
Maximizing SAP ABAP Performance
PPT
The ABAP Query
PPT
Sap abap ale idoc
PPTX
Short food chains and the rural development dynamic
PPTX
Narrative presentation
PPT
Farmer Confidence in Badger Vaccination - Bovine TB
PPTX
Delivering 'well-being' benefits through the RDPE
PPTX
Natural Flood Management Strategic Development
PPTX
Presentation by Chris Uttley, Stroud RSuds Project Officer - Delivery of Natu...
PPTX
Farmers Risk Perception of Climate Change
PPTX
Media as cd design research
PPT
The role of voluntary approaches in a regulatory environment
PPTX
Tensions in transdisciplinary practice
PPTX
Grassroots social innovations and food localisation: the Local Food programme...
PPTX
Rural Futures: the next 25 years for rural areas and research
PPTX
Traditional rural buildings as instruments of rural development
PPTX
Food Identity, Sustainability & Governance
PPTX
Web based presentation
PPTX
Ade thoriq f dan deri mardiansyah x rpl 1
PDF
Management of Rights of Way & A National Trail in the UK
Maximizing SAP ABAP Performance
The ABAP Query
Sap abap ale idoc
Short food chains and the rural development dynamic
Narrative presentation
Farmer Confidence in Badger Vaccination - Bovine TB
Delivering 'well-being' benefits through the RDPE
Natural Flood Management Strategic Development
Presentation by Chris Uttley, Stroud RSuds Project Officer - Delivery of Natu...
Farmers Risk Perception of Climate Change
Media as cd design research
The role of voluntary approaches in a regulatory environment
Tensions in transdisciplinary practice
Grassroots social innovations and food localisation: the Local Food programme...
Rural Futures: the next 25 years for rural areas and research
Traditional rural buildings as instruments of rural development
Food Identity, Sustainability & Governance
Web based presentation
Ade thoriq f dan deri mardiansyah x rpl 1
Management of Rights of Way & A National Trail in the UK
Ad

Similar to Abap query (20)

PPTX
Queries in SAP: Introduction
DOCX
Wiki sap query
PPTX
Access Chapter 02
DOCX
Sap mm query
PDF
SAP SD QUERY REPORT_GANESH
PDF
MS Access 2010 tutorial 5
PDF
PDF
Sap query creation & transcation code creation for sap query
PDF
Using infoset query ,sap query and quick viewer
PDF
Using infoset query %2c sap query and quick viewer
PDF
Abap query
DOCX
Management of database information system
PPTX
004.action query
PPT
D I T211 Chapter 5 ( Lab 3)
PPT
Querying a Database in Microsoft Access 2007
PPTX
Access essential training framework
PPTX
Ms access
PPTX
Priyank Goel PPT.pptx
DOCX
Ms access
PPT
Mic office access tutorial for beginners
Queries in SAP: Introduction
Wiki sap query
Access Chapter 02
Sap mm query
SAP SD QUERY REPORT_GANESH
MS Access 2010 tutorial 5
Sap query creation & transcation code creation for sap query
Using infoset query ,sap query and quick viewer
Using infoset query %2c sap query and quick viewer
Abap query
Management of database information system
004.action query
D I T211 Chapter 5 ( Lab 3)
Querying a Database in Microsoft Access 2007
Access essential training framework
Ms access
Priyank Goel PPT.pptx
Ms access
Mic office access tutorial for beginners

Recently uploaded (20)

PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Encapsulation theory and applications.pdf
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPT
Teaching material agriculture food technology
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
KodekX | Application Modernization Development
PDF
cuic standard and advanced reporting.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
MYSQL Presentation for SQL database connectivity
Encapsulation theory and applications.pdf
Big Data Technologies - Introduction.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Understanding_Digital_Forensics_Presentation.pptx
Teaching material agriculture food technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
“AI and Expert System Decision Support & Business Intelligence Systems”
Building Integrated photovoltaic BIPV_UPV.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Unlocking AI with Model Context Protocol (MCP)
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Mobile App Security Testing_ A Comprehensive Guide.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
KodekX | Application Modernization Development
cuic standard and advanced reporting.pdf

Abap query