Sie sind auf Seite 1von 6

Lokesh sap Consultant

SAP Query – Creation & Execution (Table Joining & Logical Database)
SAP Query is used to create reports by joining of table.
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
 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
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

Go To SQ02 Transaction

 Environment  Query areas 

Click on Query areas, the below screen will appear.

Select the Work areas like Standard area (client –specific) & Global area (cross-client).
Check in the above screen.

SAP Query Creation Process:


SAP Query – User Group Creation by transaction SQ03.
Create a logical set of User Group to which the InfoSet Queries would be assigned.
T Code: SQ03

1. If Local objects you select means it will save it in local system (Without Transport request)
2. If Package you will select means Transport request will generate.

User group ZMMTEST saved.

SAP Query – Info Set Creation – TABLE JOINING


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.
Go to 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

Joining MARA , MAKT MARC

Enter any key data table then press to navigate to table joining screen as shown below

Click on here to insert table for joining

Lokesh SAP CONSULTANT


Lokesh sap Consultant

Click on here to insert table for joining

Enter below screen will appear.

Lokesh SAP CONSULTANT


Lokesh sap Consultant

Click on to check the joining table verification.

Defined join conditions are correct.

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.

Here also we are assigning to the package

1. If Local objects you select means it will save it in local system (Without Transport request)
2. If Package you will select means Transport request will generate.
InfoSet MATERIALS saved.

SAP Query – Assigning to User Group:

Go to transaction SQ03.

Click on Save button for the assignment.

Lokesh SAP CONSULTANT


Lokesh sap Consultant

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.

Click on create

After click enter the below screen will appear

To get the report output in Basis list, Statistics and Ranked list.

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

Lokesh SAP CONSULTANT


Lokesh sap Consultant

Here we can select the screen fields for selection of data.

Final selection of fields

Save it
Query TESTING123 created.
Execution

Lokesh SAP CONSULTANT


Lokesh sap Consultant

Selection screen
Execute
Tested working.
-----x-----

Lokesh SAP CONSULTANT

Das könnte Ihnen auch gefallen