Professional Documents
Culture Documents
Fundamentals of Reporting 1
Chapter 7: ABAP Query
Where to Learn More
Overview
Rep
in the R/3 System. ABAP Query
ort
lyse
enables you to create reports by
Fl
Pain er
LIS
moving through menus. R /3 R e p o r t
ter
t
D e v e lo p m e n t
One of the strengths of ABAP Query is T o o ls
that it can be used to access just about
any data in the database. This makes it
very desirable for users in many areas LI
of a business. Several R/3 application S n
An Stan ow
areas provide predefined logical aly da illd ting
se r d
s Dr por
databases for easier information Re
retrieval.
Users do not need a background in
ABAP to use the tool. However,
knowledge of the data dictionary and basic programming is extremely helpful.
There are three main components to ABAP Query:
Functional areas define the tables and the fields within those tables that can be
queried. A functional area uses a logical database, a direct read from a table or a series of
table joins, to determine the tables available.
User groups control what functional areas and queries a user can access.
Queries are three different types of reports: Basic, statistical, and ranked lists.
A basic list is a listing of selected fields, sorted and totaled as specified by the
user in the query. All reports require a basic list.
A statistical list totals, calculates averages, and apportions percentages based
on the fields in the query.
A ranked list ranks fields based on a currency or quantity field. A single query
may have multiple statistical and ranked lists but only one basic list.
User Groups
User groups link users to functional areas and queries and control the functional areas and
queries a user can access. Each functional area is assigned to one or more user groups. For
access to ABAP Query, a user must be a member of at least one user group. All members of
a user group can access the same data as well as the same programs (queries) to create lists.
Queries
When you create different lists using ABAP Query, you can save the layout for each list. The
element created is called a query. A query is specific to a user group and functional area.
When creating a query, you may only select one functional area. Within a query, you must
also specify functional groups in the selected functional area. This means the selected area
(and the groups) must contain all the fields you wish to include in the query.
Queries have three different types of reports or lists:
Basic list: Sorts and totals selected fields as specified by the user in the query. This is
the most common kind of report.
Statistical list: Totals, calculates averages, and allocates percentages based on the
fields in the query.
Ranked list: Ranks fields based on numeric fields, including currency or quantity.
A single query may have multiple statistical and ranked lists but only one basic list.
Fundamentals of Reporting 3
Chapter 7: ABAP Query
Where to Learn More
There are several differences between ABAP Query and other reporting tools:
ABAP Query can access data from most tables within the R/3 System. Most other
reporting tools are limited to which tables they can access.
ABAP Query is ideal for listing data from any application in the system. It can
calculate additional fields such as purchase price variance (PPV) in procurement or
“aging buckets” in accounts receivable (A/R), and total and sort on any field. These
fields are calculated on each line of a detail report and then totaled by the specified
fields (for example, material or customer).
ABAP Query reports are typically simple listing and totaling reports, unlike a
balance sheet or an income statement which requires complex groupings (for example, a
cash or revenue line made up of several accounts on a financial statement). Such
complex groupings would require the query to read tables multiple times to
appropriately total and sort the accounts. Other tools (such as Report Painter/ Report
Writer which uses sets for these groupings) may be better suited for reports with
complex groupings.
To access the components of ABAP Query, use the menu paths shown in the following table:
Note: A query does lose some of its capabilities in an extract (for example, the report
assignment used for the drilldown function is not available from an extract).
The basic list shown below is a simple listing of transactions for General Ledger (G/L)
accounts. In this example, account 470000 had 15 transactions posted to it for the selection
criteria specified when executing the query.
The fields for output, selection criteria, sort options, and headers are defined within
the query.
You may expand or collapse the detail with the Basic list button.
Report call (sometimes referred to as the drilldown function) is also available from
the query. The report call is query-specific and can call a variety of reports or
transactions. The report call executes reports in the background (when a user double-
clicks on a field) based on header parameters (such as the company code and plant).
You may save the query to a file to be brought up and viewed later. However, you
lose the expand/collapse and report capability in a saved list.
Fundamentals of Reporting 5
Chapter 7: ABAP Query
Where to Learn More
To help you better understand this tool, in this section we include some of the most frequently asked
questions.
Desktop Integration
Q: What sort of integration with spreadsheet applications (for example, Microsoft Excel or Lotus
123) does this tool provide?
A: Data can be downloaded to files in several output formats. For more information, see the R/3
online help.
Q: What integration is supported for Extended Export of Lists (XXL)?
Q: Is an external system or special interface required to use this report development tool?
A: No.
Q: Does this reporting tool create reports that offer real-time processing of data?
A: The data extraction technique is pull (data is retrieved as it is called), since ABAP Query reads
data from the tables used within the applications. There is no meta data layer with ABAP Query.
Q: How does the speed of report execution change as the data load increases? That is, do reports
created with this tool get very slow as system data increases?
A: Some customers report slower performance as the data load increases.
Q: Are there any methods (for example, OSS notes, configuration, or others) which users can
employ to optimize or enhance report execution speed?
A: Performance depends on data selection and other technical conditions. Optimal performance is
achieved by using the logical databases. Archiving unused data decreases the amount of data
from which to report.
A: ABAP Query supports data integration with all application areas of R/3. No meta data is
needed, but ABAP Query can also read from meta data written from other applications and
reporting tools. This is one of ABAP Query’s main features (that all R/3 data can be interpreted
with this tool). Many other reporting tools (especially those offered by third party companies)
do not offer this flexibility.
Q: What is the availability of reports created with this tool as delivered with standard R/3?
A: There are approximately 100 query objects in Asset management (AM) and Human Resources
(HR). There are also many logical databases in several application areas.
A: Basic report development can be learned in less than a day, but extensive development skills
will take longer. With the new interface available in Release 4.5A, developing reports with
ABAP Query will be even easier.
Q: Is there an adequate number of characteristics (key figures) and drilldown levels available for
programming with this tool?
A: There are no restrictions on the number of characteristics with ABAP Query reports. There is a
limit of nine drilldown levels within a query. However, both flat (single table) and hierarchical
data can be interpreted with ABAP Query, and all tables in the R/3 System are accessible.
Q: If meta data is used by the reports developed with this tool, is it difficult to integrate or
program new data structures for use with this tool? (Note: Meta data refers to information
about the data)
A: No meta data needs to be created for ABAP Query. However, all meta data created within R/3 is
accessible.
Q: How flexible is this tool for modifying reports (developed with this tool)?
A: Some customers report having trouble in modifying reports developed with ABAP Query.
Fundamentals of Reporting 7
Chapter 7: ABAP Query
Where to Learn More
User Friendliness
Q: Is there a common look and feel among reports developed with this tool?
A: Yes.
Execution Management
A: Yes, ABAP Query takes advantage of the standard R/3 authorization concept—especially when
used with a logical database. It also provides special user groups.
Q: Does this tool provide alert and monitoring capability (for example, to let users know when
output is out of a certain range)?
A: No.
Q: Does this tool offer batch job processing and background report execution?
A: Yes.
Fundamentals of Reporting 9
Chapter 7: ABAP Query
Where to Learn More