SAP QUERY | SQ01 | SQ02 | SQ03 | SQVI

SAP QUERY | SQ01 | SQ02 | SQ03 | SQVI

SAP QUERY | SQ01 | SQ02 | SQ03 | SQVI
SAP QUERY | SQ01 | SQ02 | SQ03 | SQVI

WHAT IS SAP QUERY?

SAP Query is used to create reports for users who have the knowledge of SAP Tables and data storage structures. SAP Query allow to generate report from data stored in SAP Tables in SAP System.

SAP Query allow the users broad range of options to create report and create different types of reports like basic lists, statistics, and ranked lists.

WHAT ARE THE FEATURES IN SAP QUERY?

To create a SAP Query we have use some important components of SAP Query:

INFOSETS – Info sets are the base of any query because Info sets contains the all database tables which we are going to use when we create SAP Query.

USER GROUP – User Group is used to restrict the set of users or authorization access to set of users.

QUICK VIEWER – Quick Viewer is a tool to generate simple and quick report.

HOW TO CREATE SAP QUERY?

To create SAP Query we need to just follow the below mentioned steps :

STEP 1: Create the User Group by Transaction Code – SQ03.

STEP 2: Create the Info Sets by Transaction Code – SQ02.

STEP 3: Create the Query by Transaction Code – SQ01.

WHAT ARE THE AREAS FOR SAP QUERY?

Area for SAP Query means where set of objects having Queries, User Group and Infosets. We have 2 Major SAP Query Areas which are following:

  1. Standard Area : Standard Area is the client specific for this we don’t need to create any work bench request.
  2. Global Area : Global Area is the client independent .
image 13

HOW TO CREATE USER GROUP?

Creation of User Group is the first step of creation of SAP Query, Here which we will discuss in detail. Transaction code we use for SAP Query User Creation is SQ03. User group is the logical set of user group where we assigned the Infosets Queries.

STEP 1: Enter Transaction Code SQ03 in command box.

STEP 2: Enter User Group name in User Group text box then click on Create button.

1

HOW TO CREATE INFOSETS?

It is not practically possible or even not feasible to have all fields for selection and output when we create SAP Query because SAP database have so many numbers of tables where the transaction and master data stored. So here we introduce the concepts of Infosets which we create before the creating SAP Query.

Infosets allows us to select fields from multiple tables or single table to get selection and display the output in screen.

To create Infosets for SAP Query we will use the Transaction code SQ02 and below are the detail steps to create Infosets for SAP Query.

STEP 1: Enter Transaction Code SQ02 in command box.

STEP 2: Ener the Infosets name in Infosets text box then click on Create Button.

1 1

STEP3: Infosets title and database dialogue box will open here we have to select the Data Source and enter the table name in selected Data Source.

We have 3 type of Data Source available in Infosets creation process.

  1. Table Join Using Basis Table.
  2. Direct Read of Table.
  3. Logical Database.
1 2
1 3

STEP 4: The Infosets creation can be designed with the Combination of multiple Tables which we called Table Join, Direct read from a Single Table or with the help of Logical Database. In this Step we click on insert table button or press Shift +F1 to insert another table and create a join with these Tables.

1 4

STEP 5: In this step we select the fields which are required either to get in the report output or in the selection screen by dragging the fields from “Data Fields” to relevant “Field Group”.

1 5

Here you can also change the text of Fields which you want to display in output of your report.

STEP 6: Now click on the Generate Icon to create Infosets for SAP Query.

1 6
image 21

HOW TO ASSIGN INFOSETS TO USER GROUP?

Once the Infosets Query created or generated you have to assign same to the User Group which you created earlier, An Infosets Query can be assigned to multiple User Group.

Following process are to assign Infosets to User Group:

STEP 1: Enter Transaction Code SQ03 in command box.

STEP 2: Enter Infosets name in Infosets text box then click on Role/User Group Assignment.

image 22
image 23

STEP 3: Now click on check box of Assigned Table for which user group you want to assigned.

1 7

STEP 4: Click on Save Button.

image 25
image 26

HOW TO CREATE SAP QUERY?

Finally in this area we will create SAP Query, to create SAP Query we need to first create User Group and Infosets which we create in above steps.

Now we can designed the Query in Transaction Code SQ01, SQ01 is basically a Query Painter in which we design the basic list of Query means what you see is what you get.

STEP 1: Enter the Transaction Code SQ01 in command box.

STEP 2: Enter the Query name in Query text box and click on create button.

1 8

STEP 3: Create Query Title, Format window will open here enter the Title or description of the Query and select Output format whichever you want.

1 9

STEP 4: Now click on Basic List button and Configure your fields for selection and field display in list. You can see and configure the list structure on this screen with the help of sample data.
You click on part of the list to display the attributes of the list element You can move and change the size of list fields simply by clicking on them and altering their size/position.

1 10

STEP 5: Now click on Infoset Query button and here select the required output and selection field, you can do the same by just drag and drop option. You can enter you default value or can maintain value condition in this screen.

1 11

STEP 6: Now You can execute your SAP Query from SQ01 and check you output.

image 33

What are the SAP Query Info Set LOGICAL DATABASE ?

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

In other words Logical Database can be call as Cluster of Tables together.

Transaction Code: SE36

Following are some important Logical Database from accounting perspectives are:

  1. ADA      Assets Database
  2. AUK      Settlement documents
  3. BRF       Document Database
  4. BRM      Accounting Documents
  5. CEK      Cost Centers – Line Items
  6. CIK       Cost Centers – Actual Data
  7. CKA      Costing
  8. CKC      Order BOM
  9. CKW     Costing run: Material Selection
  10. CPK      Cost Centers – Plan Data
  11. KDF      Vendor Database
  12. PAK      CO-PA Segment Level and Line Items
  13. SDF      G/L Account Database
image 34

What is SAP Query Quick Viewer/SQVI?

SAP Query Quick Viewer/SQVI : Quick Viewer/SQVI is a tool to generate report with basic lists. Quick Viewer Reports are user dependent. While defining a Quick Viewer report data can be accessed from Tables, Logical Database, Table joins & from Infosets.

The Transaction code we use to create SAP Query Quick Viewer report is SQVI.

How to create SAP Query Quick Viewer?

Follow the below mention steps to create SAP Query by Quick Viewer:

STEP 1: Enter the Transaction code SQVI in Command box.

STEP 2: Now in Quick Viewer initial screen will open here enter the name of Query in Quick View text box then click on create button.

1 12

STEP 3: Now in Create Quick View window will open here enter the title and select the Data Source Table or Table Join and enter the table name if choose Table from data source.

1 13

STEP 4: Now in Create Quick View window shows Insert table, Check, Delete and Join Condition button. Click on Insert Table button and enter the Table Name.

1 4

STEP 5: Like above step you can select multiple table which are related and then define link between all the Tables.

STEP 6: Now click on Back button then you will see QuickViewer: Initial screen, here select the field for selection and field for display and click on Save button. Your SAP Quick Viewer Query will generated.

1 14

  1. How Many type of Data Source we have in Infosets creation?

    We have 3 type of Data Source available in Infosets creation which are:
    1. Table join using Basis Table.
    2. Direct read of Table.
    3. Logical Database.

  2. What is Field Group or data fields?

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

  3. What is the transaction code for LDB builder?

    Transaction code is SE36 for Logical database builder.

  4. SAP Query T-Codes.

    SQ03Create the User Group by Transaction Code .
    SQ02-Create the Info Sets by Transaction Code.
    SQ01-Create the Query by Transaction Code.

You May Also Like:

For the next blog please connect with us and follow us on twitter.com/einfonett

Leave a Comment