Академический Документы
Профессиональный Документы
Культура Документы
ABAP / 4 QUERY
OBJECTIVE
• A very handy tool for the functional consultants who don’t have any
prior programming experience.
The members of a user group can use all programs (queries) created by
any user of the group.
Changes to such a program are at once visible to all users. This ensures
that all members of a user group use the same evaluation programs.
Functional Areas
ABAP/4 Query allows you to evaluate data in the R/3 System. Since the
R/3 System contains several hundred thousand fields in logical
databases, tables and sequential datasets, it is simply not practical to
offer all these fields to the user for selection when creating queries.
This means that the end-user only has access to precisely those fields
assigned to a functional group.
You can assign fields of different tables to one functional group. In this
way, you can treat fields of linked additional tables and also additional
fields in the same way as true logical database fields.
ABAP / 4 QUERY
• In the Functional Area with Logical database box specify the logical
database name (e.g. Database : F1 Application : S. This is the SAP
defined flight database).
ABAP / 4 QUERY
• Tables of logical database / Joins show the tables from the logical
database.The fields from the tables are displayed in the Fields box.
• In the fields box against the fields specify the functional group
number in which you would like to include the field.
ABAP / 4 QUERY
• Repeat the above step for the fields from each table.To get the list of
the fields from other tables select the table in the Tables from logical
database / Joins box and double click.
• In the functional Area without a Logical database area give the base
table name.
• Check the table join check box and click on the table join button.
ABAP / 4 QUERY
• In the joined tables area give the table names which you want to
include in the join condition .
• The base table name will be grayed out. Now select two tables by
selecting the check boxes for defining the join condition.
• You will see mapping between the tables on the right side under the
Join Conditions area.Click on the button (with + and down arrow
symbol) to specify the join between the tables
• In the next screen that you get, if there is a foreign key relationship
defined between the tables then you will see 00 = 00 (signifying the
join) displayed against the common fields of the tables else you can
specify the join yourself by typing in 00 or 01 etc.
ABAP / 4 QUERY
• Click on Back arrow button to come back and continue defining the
conditions for more tables if required.
• Tables of logical database / Joins show the tables from the logical
database.The fields from the tables are displayed in the Fields box.
• In the fields box against the fields specify the functional group
ABAP / 4 QUERY
• Repeat the above step for the fields from each table.To get the list of
the fields from other tables select the table in the Tables from logical
database / Joins box and double click.
• In the user Group, specify the names of the users who are authorized
to use this functional area / query.
• Give a description to the user group and specify the names of the
users.
CREATING A QUERY
• Select the functional area for the user group by double clicking it.
• The list of Functional Groups that were defined in the functional area
is displayed. Select the ones required. The fields from this group will
only be displayed in the next screen.
• The fields from each functional groups is displayed. Select the fields
that you want to include in your query report.
• You can also change the selection text contents to the way you want
it to appear in the selection screen.
ABAP / 4 QUERY
• You can also create local fields that you would like to include in this
query only. You have to give a short name for the local fields that you
create.
• You can include fields such as user name, system date,time etc.
• You can also maintain column headers for the fields. Select the filed
and then choose EDIT->COLUMN HEADER->MAINTAIN.
• Now select the query Report type (Basic List, Statistics or Ranked
List) that you want to generate.
ABAP / 4 QUERY
Create a Query
ABAP / 4 QUERY
Insert Table
ABAP / 4 QUERY
Create Query
ABAP / 4 QUERY
SelectFields
Select Required Required FieldsNext Button
and Click
ABAP / 4 QUERY
Execute Query
ABAP / 4 QUERY
SUMMARY
Exercise
• Create a User Group and assign the same to the Functional Area
Created.
• Finally create a Query and assign the same to the Functional Area.
Exercise
• Create a user group and attach the user group to the functional area
created.