Anda di halaman 1dari 20

For Internal Use Only

23 May 2014
ABAP Query
23 May 2014
For Internal use Only
2
Whenever a Developer or a Functional Consultant need to generate report without
any coding using ABAP , we can make use of ABAP Queries .

The whole process of creating a report using ABAP Queries comprises of the following
steps

1) Creation of user group
2) Creation of infoset
3) Creation of queries


Introduction
23 May 2014
For Internal use Only
3


SQ01 ABAP Query

SQ02 Infoset

SQ03 User Group

Transaction Codes used
23 May 2014
For Internal use Only
4


Creation Of Usergroup
Transaction used for creation of user group is SQ03. For extracting data from
infoset , the infoset must be assigned to one user group before the data source
can be generated.
Click the create button , give the description of user group and save it
23 May 2014
For Internal use Only
5


Creation Of Infoset

The transaction associated with creation of infoset is SQ02










By clicking on the Create button , a popup opens . Give a description at the
name field and specify the basis table to join as VBRK and press OK
23 May 2014
For Internal use Only
6
In next screen , a new table can also be inserted by clicking on the Insert table
button on the application tool bar. Give VBRP as input in the Add table pop up . By
default join conditions are displayed or else they can be determined by clicking the
joining condition button.

23 May 2014
For Internal use Only
7
For maintaining the infoset , click on the infoset button . A pop up opens asking for
what fields should be there in the field groups . Select radio button Create empty field
group and press ok.

23 May 2014
For Internal use Only
8
Two empty field group got created . In the left hand pane we can find the list
of fields in both the tables VBRK and VBRP. Drag and drop the fields from the
left hand pane to the fields groups. Click on the Generate button to generate
the infoset.
23 May 2014
For Internal use Only
9
Go back to the main screen of the transaction SQ02 by clicking the Back Button on
the standard tool bar. Click on Role / User Group Assignment to assign the infoset
to a specific group.

Check the check box beside the user group and Save to assign infoset to them. In
our case ZSDN_ISET is assigned to ZSDN_UGRP.



23 May 2014
For Internal use Only
10
Creation Of ABAP Query
Transaction for creating the ABAP query is SQ01.
Give ZSDN_QUERY as Query Name and click on Create button. A hit list opens
with all the list of infosets assigned to the user group (ZSDN_UGRP). Select
ZSDN_ISET and click ok.



23 May 2014
For Internal use Only
11
Click on the Next Screen to select the field groups that are to be used in our query.




Click on the Next Screen to select the list of fields required in the query.



23 May 2014
For Internal use Only
12

Click on Next screen to determine which of these fields are to be select options
and parameters


23 May 2014
For Internal use Only
13

Determine the order in which fields are displayed on the screen.

23 May 2014
For Internal use Only
14

Give the input as specified in the below screen shot.




Click on the Next Screen to check the sequence specification.




23 May 2014
For Internal use Only
15

Click on the Next Screen to specify the field output options.
Length , position and color format of the fields on the output screen can be
changed.
Unit can be displayed before the value or after the value or the unit need not
displayed at all




23 May 2014
For Internal use Only
16

Click on the Next screen to specify the report header and footer.



23 May 2014
For Internal use Only
17

Give some text sample Report For ABAP Query as header and &%DATE gives the
current date in footer.
Click on the Next screen to determine the graphics.



23 May 2014
For Internal use Only
18

The ABAP query will automatically generate a report program , The name of the
report program can be taken from the menu bar option as shown below. Create
the transaction code for this automatically generated report in the normal way.


23 May 2014
For Internal use Only
19

Click Ok to get the selection-screen displayed.
Give the input to it as per our requirement.

23 May 2014
For Internal use Only
20

Thank You

Anda mungkin juga menyukai