Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

SAP Query - Table Join & Logical Database

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

SAP QUERY REPORT FOR ALL FUNCTIONAL

CONSULTANTS

Introduction about SAP QUERY:

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.

The whole process comprises of three steps..

 Creation of user group

 Creation of info set

 Creation of queries

The transaction codes associated with ABAP Query are

 SQ03 – User Group

 SQ02 - Info set

 SQ01 – SAP Query

Step-1: SQ03---USERGROUP CREATION

The technical definition of “User Groups” is a collection of SAP users who are
grouped together.

A user’s assignment to a user group determines which queries he or she can


execute or maintain. Additionally, it designates which Info Sets the user can access

Basically, Query Groups permit users to create, modify, and execute reports in a
certain area within R/3.

The relationship b/w user group and Info set is one to many.

One user group can be assigned to no. of Info sets, in which users are placed.

1|Page

CREATED BY
GANES.TARLANA
SAPSD
SAP QUERY REPORT FOR ALL FUNCTIONAL
CONSULTANTS

SAP QUERY REPORT CONFIGURATION

Mention User Group Name and click create

Mention short text name and save it.

Assign Users in User group

Save it again.

Step-2: SQ02--.INFOSET CREATION

An Info Sec describes which fields of a data source can be reported on in queries.

1. Mention info set and Click create

2|Page

CREATED BY
GANES.TARLANA
SAPSD
SAP QUERY REPORT FOR ALL FUNCTIONAL
CONSULTANTS

2.Mention Info set name

Data source

 TABLE JOIN : Multiple tables (VBAK,VBAP,LIKP,LIPS,VBRK,VBRP)

 DIRECT READ TABLE: Single Table VBAK

Select Table join and Press Enter then system show Navigation Screen

3|Page

CREATED BY
GANES.TARLANA
SAPSD
SAP QUERY REPORT FOR ALL FUNCTIONAL
CONSULTANTS

If you want to add other tables click Insert Table then Click the JOIN
Conditions and then click Info set Maintain

System gives one pop with following options

A. include all tables fields: All fields

If you select first one system takes all the fields from selected tables.

Example: it is for your understanding

Sales Header Data VBAK

4|Page

CREATED BY
GANES.TARLANA
SAPSD
SAP QUERY REPORT FOR ALL FUNCTIONAL
CONSULTANTS

Sales Item Data VBAP

B. Key fields for user specific: System taken default fields

S.NO FIELDS
1 Sales document
2 Sales document item
3 Material Number

C.Create empty field group: Add user specific Fields

1. Two empty field groups got created. In the left pane, we find the list of
fields in both the tables VBAK and VBAP.
5|Page

CREATED BY
GANES.TARLANA
SAPSD
SAP QUERY REPORT FOR ALL FUNCTIONAL
CONSULTANTS

2.Drag and drop the fields from the left pane on to the field groups

Click save button system gives one pop up screen

Package or Local object both are optional.

6|Page

CREATED BY
GANES.TARLANA
SAPSD
SAP QUERY REPORT FOR ALL FUNCTIONAL
CONSULTANTS

click Generate Button after Save Infoset.

ASSIGNEMENT OF INFOSET TO USERGROUP

Go to Info set and click Role/user assignment

Select our user group and save it.

Note: when we save the info set it’s automatically assign to our user
group.

Next step continuous in next page

7|Page

CREATED BY
GANES.TARLANA
SAPSD
SAP QUERY REPORT FOR ALL FUNCTIONAL
CONSULTANTS

Step-3: SQ01----SAP QUERY REPORT CREATION

Create SAP QUERY

Enter query name (our own name) and Click create button then system open
another screen. Please observe below screen.

8|Page

CREATED BY
GANES.TARLANA
SAPSD
SAP QUERY REPORT FOR ALL FUNCTIONAL
CONSULTANTS

Next screen will open

9|Page

CREATED BY
GANES.TARLANA
SAPSD
SAP QUERY REPORT FOR ALL FUNCTIONAL
CONSULTANTS

a) ENTER Query title name

b) Select output format

SAP provides different types of report output for user specific.

c) Click Basic List then system will open layout design.

10 | P a g e

CREATED BY
GANES.TARLANA
SAPSD
SAP QUERY REPORT FOR ALL FUNCTIONAL
CONSULTANTS

The below screen is showing report layout design

Select Table and drag all the fields

System shows our selected tables, List fields, Selection fields.

1. List Fields means Output fields

11 | P a g e

CREATED BY
GANES.TARLANA
SAPSD
SAP QUERY REPORT FOR ALL FUNCTIONAL
CONSULTANTS
2. Selection Fields means Input Fields.

Select output list fields and Input Fields from our selected tables then click Test
button.

After above step click the test and System open report input screen

Enter our input data and Execute (Press F8) then system is shows our designed
simple report.

Please observe below screen.

12 | P a g e

CREATED BY
GANES.TARLANA
SAPSD
SAP QUERY REPORT FOR ALL FUNCTIONAL
CONSULTANTS

This is SAP Query report output.

The below step Explains query and user specific transaction report and in this step
integration will be there B/W Functional consultants (FI, SD, MM, PP etc.…) and
Technical consultants (ABAP).

Step-4 Maintain user specific transaction (ABAPER WILL DO THIS STEP)

Go to SE93

Create new transaction YQ01

Mention short text name

Select Parameter transaction and press enter

Maintain default transaction START_REPORT

[*] Skip initial screen

13 | P a g e

CREATED BY
GANES.TARLANA
SAPSD
SAP QUERY REPORT FOR ALL FUNCTIONAL
CONSULTANTS
Maintain default values in SE93

Note: The below parameters are mandatory for any query report

Name of screen field Values


D_SREPOVARI-REPORTTYPE AQ
D_SREPOVARI-EXTDREPORT SAP QUERY NAME(Z_QUERY_SALES)
D_SREPOVARI-REPORT USER-GROUPNAME(Z_USEER_GROUP)

Click the TEST Button .

If success, then save it.

Now execute YQ01 Transaction.

Give your input data and Execute

System will show user specific simple report.

User specific report -1

14 | P a g e

CREATED BY
GANES.TARLANA
SAPSD
SAP QUERY REPORT FOR ALL FUNCTIONAL
CONSULTANTS

User specific report -2

1. Requirement: I want to see Sales report, sales organization wise with


diagrammatically.

Output Format

15 | P a g e

CREATED BY
GANES.TARLANA
SAPSD
SAP QUERY REPORT FOR ALL FUNCTIONAL
CONSULTANTS
SALES SALES SALES DISTRI.CHANNEL DIVISION SALES CUSTOMER Net Plant
DOC DOCTYPE ORG OFFICE value

This is SAP QUERY REPORT.

THE END

16 | P a g e

CREATED BY
GANES.TARLANA
SAPSD

You might also like