abap statistical query
TRANSCRIPT
-
8/14/2019 Abap Statistical Query
1/14
qwertyuiopasdfghjklzxcvbnmqwerty
opasdfghjklzxcvbnmqwertyuiopasdfg
klzxcvbnmqwertyuiopasdfghjklzxcvb
nmqwertyuiopasdfghjklzxcvbnmqwe
yuiopasdfghjklzxcvbnmqwertyuiopa
dfghjklzxcvbnmqwertyuiopasdfghjklz
vbnmqwertyuiopasdfghjklzxcvbnmq
wertyuiopasdfghjklzxcvbnmqwertyu
pasdfghjklzxcvbnmqwertyuiopasdfgh
klzxcvbnmqwertyuiopasdfghjklzxcvbmqwertyuiopasdfghjklzxcvbnmqwer
uiopasdfghjklzxcvbnmqwertyuiopasd
ghjklzxcvbnmqwertyuiopasdfghjklzxvbnmqwertyuiopasdfghjklzxcvbnmrt
uiopasdfghjklzxcvbnmqwertyuiopasd
ghjklzxcvbnmqwertyuiopasdfghjklzx
Statistical Query
http://abap-tutorials.com
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/ -
8/14/2019 Abap Statistical Query
2/14
http://abap-tutorials.com 2010
Creating Statistical QUERY
eating Statistical Query is a three phase activity .
The first activity is creation of USER GROUPS using transaction SQ03
The Second activity is creation of INFOSET using SQ02
The last and the final activity is creation of QUERY using transaction SQ01
us see each of these activity in detail
A) Creation of USER GROUPS using transaction SQ03Go to transaction SQ03
The following screen pops up
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/ -
8/14/2019 Abap Statistical Query
3/14
http://abap-tutorials.com 2010
Type the name of the user group you want to create ( for example SALES ) and click on the create icon .The follow
screen pops up
On clicking on Save icon your USERGROUP get stored .
B) Creation of INFOSET using transaction SQ02This is second and one of the most important activity in statistical query creation . In this activity you follow t
following steps .
Go to transaction SQ02 .
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/ -
8/14/2019 Abap Statistical Query
4/14
http://abap-tutorials.com 2010
The following screens pops up
You type a name for the INFOSET you are going to create and click on the create icon. The following menu pops up
Fig : A
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/ -
8/14/2019 Abap Statistical Query
5/14
-
8/14/2019 Abap Statistical Query
6/14
http://abap-tutorials.com 2010
You select/ insert the other tables you want using the icon Insert Tables . The screen looks like as shown below
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/ -
8/14/2019 Abap Statistical Query
7/14
http://abap-tutorials.com 2010
Please note that if the tables are standard SAP tables , the joining rule definition is proposed automatically . Else t
user has to create Join definition by clicking on the corresponding fields in related table and then dragging one from on
table to the other field in the other table . These Join definitions thus defined can be checked by using root JOIN > CHE
LINK COND .
On establishing the join definition , you click on the back icon to save . The following menu pops up
Now you generally select option Create Empty Fields Groups and click continue button . The following menu pops u
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/ -
8/14/2019 Abap Statistical Query
8/14
http://abap-tutorials.com 2010
You either delete or create more Field Groups by using root Edit> Field Group > Create fields group .
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/ -
8/14/2019 Abap Statistical Query
9/14
http://abap-tutorials.com 2010
You then add required fields from the various tables by following steps
a) click on the Drop down icon , to get list of fieldsb) Select the required fieldc) Drag the field from the left side to Right side field group . Finally the field group looks like as shown below .d) Then you save the INFOSET
ease Note that if the fields are preceded by icon it means that only field value will get into the field group and if th
preceded by icon it means that both field value and text will get into the field group ]
Then you check for any inconsistencies using root Infoset > Check
Then you generate the Infoset using root Infoset > Generate
The this generated Infoset is assigned to User group ( existing ). ( Refer Fig A in page 3)
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/ -
8/14/2019 Abap Statistical Query
10/14
http://abap-tutorials.com 2010
C) Creation of Satistical QUERY using transaction SQ01
Goto Transaction SQ01 . Select the appropriate USER Group .
Type the name of query (15 characters) and click on create icon .The following screen pops up.
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/ -
8/14/2019 Abap Statistical Query
11/14
http://abap-tutorials.com 2010
Select the appropriate INFOSET and click on the choose button .The following screen pops up.
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/ -
8/14/2019 Abap Statistical Query
12/14
http://abap-tutorials.com 2010
Then you go to the root GOTO>FIELD SELECTION> SELECT FIELD GROUP and select the appropriate field group.
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/ -
8/14/2019 Abap Statistical Query
13/14
http://abap-tutorials.com 2010
Then you go to the root GOTO>FIELD SELECTION> SELECT FIELD to select the field that you need in the report. You sele
the required fields and click on Basic List , where you list the line number , sequence number and sorting order for th
output . This is one of the most important activities in creating Statistical QUERY.
Then you go to the root GOTO>FIELD SELECTION> SELECTION to select the field that you need in the selection screeYou select the required fields for selection and allocate number to the same. Also you specify whether multiple entries a
allowed or not by using Sngl field. Ifyou tick the Sngl field then only single entry is allowed
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/ -
8/14/2019 Abap Statistical Query
14/14
http://abap-tutorials.com 2010
Save the query and execute the report. Thus a query has been created.
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/