0% found this document useful (0 votes)
12 views

SAP Query - Creation & Execution - Table Join & Lo... - SAP Community

The document provides a comprehensive guide on creating and executing SAP Queries, focusing on table joins and logical databases. It outlines the steps for creating user groups, info sets, and queries, along with the necessary transaction codes. Additionally, it explains the features of SAP Query, including the use of Quick Viewer for report generation.

Uploaded by

sajidcurious
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

SAP Query - Creation & Execution - Table Join & Lo... - SAP Community

The document provides a comprehensive guide on creating and executing SAP Queries, focusing on table joins and logical databases. It outlines the steps for creating user groups, info sets, and queries, along with the necessary transaction codes. Additionally, it explains the features of SAP Query, including the use of Quick Viewer for report generation.

Uploaded by

sajidcurious
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo...

- SAP Community
m
m
Products and Technology Groups Partners Topics Events What's New Get Started
u
ni
t
y
SAP Community  Products and Technology  Enterprise Resource Planning  ERP Blogs by Members
 SAP Query - Creation & Execution - Table Join & Lo...

Enterprise Resource Planning Blogs by Members


Gain new perspectives and knowledge about enterprise resource planning in blog posts from community
members. Share your own comments and ERP insights today!

Blog  What are you looking for today?

SAP Query - Creation & Execution - Table Join & Logical


Database

Former Member


‎2014 May 09 11:47 AM

 40 Kudos  322,586

SAP Managed Tags: FIN (Finance)

SAP Query - Overview:

SAP Query is used to create reports for users who have little knowledge about SAP
Table data storage structure. SAP Query allows evaluating data in the SAP system.

SAP Query offers users a broad range of ways to define reporting programs and
create different types of reports such as basic lists, statistics, and ranked lists.

SAP Query - Features:

Following are the major components which are associated with SAP Query:

Info Sets - Are base for the Query and it contains one or more database table
details
Queries – For the User to create and generate the Query

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databas… 1/23
3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo... - SAP Community

User Group – To restrict set of Users for a specific Query plus for
Authorizations
Quick Viewer - A simple tool for quick report generation

SAP Query - Creation:

Step 1: Creation of User Group - SQ03

Step 2: Creation of Infoset - SQ02

Step 3: Creation of Query - SQ01

The Terminologies:

SAP Query - Area:

SAP Query Area is a set of objects having queries, InfoSets and User Groups which
are consistent.

Following Query Areas:

Standard Area – They are Client Specific Queries and do not create an Work
Bench Request
Global Area - Queries in the Global Area are Client Independent

SAP Query - User Group Creation:

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databas… 2/23
3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo... - SAP Community

Transaction Code: SQ03

Create a logical set of User Group to which the InfoSet Queries would be assigned.

SAP Query - Info Set Creation - TABLE JOIN:

SAP database have several numbers of tables in which the transactions, master data
gets stored and it’s practically not feasible to have all such fields for selection
when creating a query. Hence before the start of creating a query, InfoSet creation
is required.

It allows selecting Fields from either the tables selected or the logical database
used to get display/select in the output.

Transaction Code: SQ02 –

The InfoSet creation can be made with the Combination of Tables (Table Join),
Direct read from a Single Table or with the help of Logical Database.

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databas… 3/23
3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo... - SAP Community

The Red Box marked Icon allows adding more tables under the join.

Field Group contains the Fields which are required either to get in the report
output or in the selection screen.

Drag the Fields for the “Data Fields” to the relevant Field Groups to appear in the
report.

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databas… 4/23
3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo... - SAP Community

You can even change the text of the Fields that is getting displayed over the
Output.

Once the InfoSet is created, it needs to be generated by click on "Generation"


icon.

Any changes made to the InfoSet, it needs to be re-generated everytime.

SAP Query - Assigning to User Group:

Transaction Code: SQ03

All the InfoSet queries which are created to be assigned to one or more user group

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databas… 5/23
3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo... - SAP Community

Click on Save button for the assignment.

SAP Query - Query Creation:

Transaction Code: SQ01

Once the InfoSets are created and assigned to User Group, Query needs to be
designed. It is basically known as Query Painter in which we design basic lists in
WYSIWYG mode (what-you-see-is-what-you-get).

We need to select the User Group first in which query needs to be designed. Click
on icon to select the user group.

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databas… 6/23
3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo... - SAP Community

Specify the Query Name and click on the Create Option.

Select the InfoSet which had been created.

Following screen would appear:

We can select the Output Format, Variant assignment over the Basic List.

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databas… 7/23
3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo... - SAP Community

Click on

to select the required Output/Selection Field.

Click on Save Option to make a final design.

To Run the Query Click on Execute Button:

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databas… 8/23
3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo... - SAP Community

SAP Query - Info Set - LOGICAL DATABASE:

The LDB is special type of ABAP program that combines the contents of certain
related database tables and retrieves some related data and make it available to
application programs. The LDB usually consists of the components like Structure,
Selections and Database programs.

In simple words Logical Database can be referred as Cluster of Tables together.

Transaction Code: SE36

Following are some useful Logical Database from accounting perspectives:

ADA Assets Database


AUK Settlement documents
BRF Document Database
BRM Accounting Documents
CEK Cost Centers - Line Items
CIK Cost Centers - Actual Data
CKA Costing
CKC Order BOM
CKW Costing run: Material Selection
CPK Cost Centers - Plan Data
KDF Vendor Database
PAK CO-PA Segment Level and Line Items
SDF G/L Account Database

Example:

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databas… 9/23
3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo... - SAP Community

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databa… 10/23
3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo... - SAP Community

Once the Table are copied follow the same steps as mentioned above for creation
of Field Groups, Query Creation & Execution.

SAP Query - QUICKVIEWER - SQVI:

Quick Viewer is tool to generate report with basic lists. Quick View Reports are user dependent.
While defining a Quick View Tool report data can be accessed from Tables, Logical Database, Table
joins & from Infosets also.

Transaction Code: SQVI

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databa… 11/23
3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo... - SAP Community

We get an option of extracting the data from a Table / Table Join / Logical Database / SAP Infoset

Once all the required tables are been assigned and joined, click no the Back Icon to
Create the Selection / Output Screen.

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databa… 12/23
3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo... - SAP Community

Select all the required fields, which are needed as a part of Selection Screen and
Report Output Layout and save the Quick Viewer Query.

To execute teh Query, Click on Execute Button to the run the Quick Viewer.

Above are the simple options of creating report with the help of Queries.

BR, Jaymin R. Bhatt

14 Comments

Former Member

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databa… 13/23
3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo... - SAP Community


‎2014 May 09 4:32 PM

 0 Kudos

Good Document :smile:

Former Member


‎2014 May 09 5:25 PM

 0 Kudos

Thanks...

former_member193854
Participant


‎2014 May 09 6:36 PM

 0 Kudos

Very nice documentation. Thanks, Jaymin.

rane_prashant
Contributor

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databa… 14/23
3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo... - SAP Community


‎2014 May 11 1:29 PM

 0 Kudos

Hello Jaymin,

Thanks for sharing the document.

Is it possible for you to share one example of logical database query for ADA? Thanks
in advance!

my email ID [email protected]

B/R

Prashant Rane

mariks
Participant


‎2014 May 12 1:38 PM

 0 Kudos

Thanks for the sharing valuabledocument...

Former Member


‎2017 Nov 10 4:51 AM

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databa… 15/23
3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo... - SAP Community

 0 Kudos

CAN ANYONE HELP

former_member183424
Active Contributor


‎2017 Nov 10 5:06 AM

 0 Kudos

You are in comment section in a blog post. What help do you need? If you have any
doubt regarding this blog post, then ask that instead of just posting "Can anyone
help".

former_member132664
Member


‎2018 Dec 11 2:55 AM

 0 Kudos

Hi Jaymin,

Thanks for the blog with such detailed steps.

cigilr
Explorer


‎2019 Mar 15 9:56 AM

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databa… 16/23
3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo... - SAP Community

 0 Kudos

Thanks

former_member210259
Member


‎2019 Sep 18 7:46 AM

 0 Kudos

Thanks for the complete explanation on SAP Query.

Can anyone also help for Making t-code after completing all the query building so
that user can use via t-code. Advance thanks..

ZAIED

samnovice_new
Participant


‎2019 Oct 01 12:01 PM

 0 Kudos

zaiedbd

Please click here for youtube instructions.

I hope it helps.

BR.

Sam

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databa… 17/23
3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo... - SAP Community

HamzaKhurshid
Explorer


‎2020 Dec 02 12:28 PM

 0 Kudos

Very informative.

former_member706942
Explorer


‎2021 Jan 21 12:05 PM

 0 Kudos

Nice explanation

Tokomak
Explorer


‎2022 Jul 05 2:49 AM

 0 Kudos

Hello Sir,

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databa… 18/23
3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo... - SAP Community

How to create package that use in user group and tcode creation process for query
report?

You must be a registered user to add a comment. If you've already registered,


sign in. Otherwise, register and sign in.

Comment

Labels In This Area


"Best Practice" 1 "Data Source Migration" 1 "mm02" 1

"SAP Sales" SAP Cloud 1 $session in CDS 1 'abap' 1 *SAP" 1 - SAP 1

2023 Upgrade 1 @expertsap 2 @sapcommunity 1

A_PurchaseOrderItem additional fields 1 ABAP 5 ABAP 7.4 1 abap cds 1

ABAP CDS VIEW 2 ABAP CDS Views 2 ABAP CDS Views - BW Extraction 1

ABAP CDS Views - CDC (Change Data Capture) 2 ABAP DDIC CDS view 1

ABAP development 2 ABAP Extensibility 1 ABAP Programming 1

ABAP Query 1 abapGit 1 ACCOSTRATE 1 Account Assignment Category 1

ACDOCP 1 Adding your country in SPRO - Project Administration 1

Adobe form binding 1 Adobe forms 1 Adobe Printing 1

Advance Return Management 1 Advanced Intercompany Sales (5D2) 1

Advanced Returns Management 1 Advanced SAP Techniques 1

ADVANCED VARIANT CONFIGURATION 1 AgenticAI 1 agentless 1

AI and RPA in SAP Upgrades 1 ALV 1 ALV GRID 1 ALV Report 1

API and Integration 1 Application Development for SAP HANA Cloud 1

Approval Workflows 1 Ariba 1 ARM 1 Artificial Intelligence (AI) 1 ASN 1

Asset Management 1 Asset under construction 1 Assigned budget 1

Associations in CDS 1 Associations in CDS Views 2 Attachment List 1 audit 1

auditlog 1 authorization 1 Auto PO from GR 1 Availability date 1

Azure Center for SAP Solutions 1 AzureSentinel 3 BADI 1 Bank 2

BAPI_PO_CREATE1 1 BAPI_SALESORDER_CREATEFROMDAT2 1

batch characteristics 1 Batch Classification 1 batch Determination 1

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databa… 19/23
3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo... - SAP Community

Batch Management 1 Best Practice 1 Billing 1 BP 1 bp business partner 1

BRF+ 1 BRFPLUS 1 Budget for PRs 1 Bundled Cloud Services 1

business participation 1 Business Partner 2 Business Partner Master Data 3

Business Processes 2 Business Trends 1 Business Trends​1

Capacity Planning 1 CAPM 1 Carbon 1 CDS Annotations 2

CDS View with Parameter 2 Cental Finance 1 Central finance 1 CFIN 2

CFIN Document Splitting 1 Charge calculation 1 CL_GUI_ALV_GRID 1

Classical MRP 1 Cloud 2 cloud alm 1 Cloud Integration 1

Related Content
Financial Accounting for Hierarchical Setup in Item-Based Services
in Enterprise Resource Planning Blogs by SAP Thursday

An in-depth look at clean core business processes, read our Clean Core for S/4
HANA Cloud paper!
in Enterprise Resource Planning Blogs by SAP Tuesday

LSMW - Legacy System Migration Workbench


in Enterprise Resource Planning Blogs by Members Tuesday

LSMW - Legacy System Migration Workbench


in Enterprise Resource Planning Blogs by Members Tuesday

Environment, Health, and Safety in SAP S/4HANA Cloud Public Edition 2502
in Enterprise Resource Planning Blogs by SAP a week ago

Popular Blog Posts

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databa… 20/23
3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo... - SAP Community

IDoc Basics For Functional Consultants

former_member213836
Active Participant

 1102254  320  683

LSMW for Functional Consultants in simple step-by-step way

former_member182098
Active Contributor

 652846  295  394

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databa… 21/23
3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo... - SAP Community

Pricing procedure Steps and Details in SAP MM

former_member183424
Active Contributor

 791780  161  332

Top Kudoed Authors

JayRamandika  8

DafinaZahra  6

rlaela  4

rohithkumar15  4

RaghavanKathamuthu  3

VKR_23  3

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databa… 22/23
3/1/25, 2:48 PM SAP Query - Creation & Execution - Table Join & Lo... - SAP Community

former_member493884  3

Meka_Maduvandi_K  3

RajaGopalan  2

venkateshgolla  2

View all

Privacy Terms of Use

Copyright Legal Disclosure

Trademark Support

Cookie Preferences
Follow

https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/sap-query-creation-amp-execution-table-join-amp-logical-databa… 23/23

You might also like