Sie sind auf Seite 1von 19

SAP R/3 Document – ABAP/4 Query

ABAP/4 QUERY

A
BAP/4 Query is powerful tool to generate simple reports without the
need for any coding. This is a very handy tool for the functional
consultants who don’t have any prior programming experience. This
document is not meant to teach ABAP/4 Query completely but is meant to give
a lead to learn it.

Summary :

In order to create an ABAP/4 Query, one has to do the following:


1. Create an User Group
2. Create and Functional Area.
In the functional Area, one has to mention how the data in the query is
coming from (i.e. through a logical database or from an individual table
using a program or joins etc.). Within the functional area you also have the
functional groups categorizing fields from the tables into different groups.
3. Assign the User Group to the Functional Area
4. Create the Query based on the functional area created

The above four steps have to be done to create an ABAP/4 Query. Creation of
Query is a simple process.

ABAP/4 Query provides for three different kinds of reports:

Ø BASIC LIST - Simple reports


Ø STATISTICS - Reports with statistical functions such Averages,
Percentages…
Ø RANKED LIST - for analytical reports

Within a query, you can define one basic list, up to 9 statistics and up to 9
ranked lists. These different list types may be combined in any permutation you
like. You can also extend existing queries by adding more sub-lists. Unless you
have specified otherwise, you see the basic list first, followed by the statistics
and finally the ranked lists when you execute a query.

One has to be clear as to what kind of report he / she wants and select the
fields in the functional area accordingly and also the kind of report. One can
also generate graphical reports in ABAP/4 Query.

There are different paths to create the functional area, user group and queries.
You can create any of these by choosing Tools à ABAP/4 Workbench à
Utilities à ABAP/4 Query or executing the transaction codes for each of them:
ü SQ01 for Query
ü SQ02 for Functional Area
ü SQ03 for User Group

Created / Compiled By : P. M. V. Subba Rao 1


SAP R/3 Document – ABAP/4 Query

The first step in the process of creating a ABAP/4 Query is to create an


Functional Area. Functional Area provides special views of logical databases.
They determine which fields of a logical database can be evaluated in queries.
Functional areas are assigned to user groups.

You can assign one functional area to many user groups.

The functional area could be created with a logical database or without a logical
database. You can opt any one of them for creating a query. In the functional
area you specify how and where from the data in the query is going to retrieve
from.

For creating a functional area with a logical database you have to mention the
logical database name and then you can select the fields from the tables in the
logical database for your query.

You can create a Functional Area without a logical database too. You create a
functional area without a logical database with the following choices:

a. You can create a functional area with a single table


b. You create a functional area using a ABAP/4 program
c. You can create a functional area using Table Joins
d. You can also use Sequential Dataset.

Part I deals with the steps involved in the creation of Functional Area.
Functional Area can be created with or without a Logical Database.

First we will go through the procedure of creating the Function Area with a
Logical Database.

CREATING AN FUNCTIONAL AREA ( with a Logical Database)

Ü The first step in creation of a ABAP/4 Query is to create an Functional Area.

Ü To create an Functional Area goto

Ü Tools à ABAP/4 Workbench à Utilities à ABAP/4 Query à Functional Areas

Ü Give a Functional Area name and Click on Create button.

Created / Compiled By : P. M. V. Subba Rao 2


SAP R/3 Document – ABAP/4 Query

Ü A functional area is the definition of the fields in the query.

Ü In the next screen give a description to the functional area. A functional area
can be created with a logical database or without a using a logical database.

Ü 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).

Ü Click on Functional Group button on the application toolbar to create the


functional group for the fields from the tables in the logical database.

Ü Window : Change Functional Area <Functional Area name>

Ü In this screen in the Functional Groups box mention the functional Group
number and description ( e.g. 01 – Flight, 02 – Demo, 03 – Bookings etc.).

Ü Tables of logical database / Joins show the tables from the logical database.
The fields from the tables are displayed in the Fields box.

Ü To change the list double click on the table name.

Ü In the Fields box against the fields specify the functional group number in
which you would like to include the field.

Ü If the list of fields in the fields box is not completely displayed then to display
the entire list of fields or to have broader display of place the cursor in the
fields box area and click on Settings à Full Screen from the menu bar.

Ü Do 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.

Ü Save the Functional Area and Generate it. Click on the SAVE icon and then
on Generate icon on the toolbar to save and generate the functional area.
DON’T FORGET TO GENERATE THE FUNCTIONAL AREA.

Ü You can add additional fields (user defined fields), additional tables and
assign them to any table in the logical database. These additional fields can
be seen from the fields’ list of the assigned table.

Created / Compiled By : P. M. V. Subba Rao 3


SAP R/3 Document – ABAP/4 Query

Ü To add additional fields from the menu bar choose GOTO à Additional
Field

In the next screen that you get, give the field name and the table name from
the logical database in which this field has to include.

Click on the enter icon.

In the next screen specify the Sequence, Description, Heading, technical


attributes for the fields like field type, length etc. and then you can also
specify any formula for the field.

Save the field details.

You can to the same for any more fields, which you would like to include in
the query.

If you create two additional fields, and the second field uses the first field in
its code then the sequence of the second field should be higher than the
sequence of the first.

You can also include tables. Choose GOTO à Additional Tables

You can also include your own selection criteria and parameters for
executing the query other than default selection screen and parameters

If you include your own selection criteria and parameters then you have to
write a code for them to take any effect.

If you define Parameters as part of your selection screen you must also
evaluate them in functional area code otherwise they will have no effect.

Note : Please the online documentation for more information on this.

You can also write Code for the query that is to be executed at the time of
executing the query. Choose GOTO à Code

What code you want to write is up to you and the output of query you
design.

The point at which an ABAP/4 Query reads an additional table or performs


calculations on additional fields depends on logical database table since the
associated ABAP/4 code becomes part of the GET event processing of the
table.

Created / Compiled By : P. M. V. Subba Rao 4


SAP R/3 Document – ABAP/4 Query

If you want to display something before the execution of the query /


accessing the logical database, you write the code for that in START-OF-
SELECTION (Goto à Code à START-OF-SELECTION).

If you want display something before or after the output of the query, you
write the code for that in END-OF-SELECTION.

If you want to display something at beginning of the page then you write the
code for that in TOP-OF-PAGE.

Ü Save and generate the functional Area.

Ü Click on Back icon to come out.

Next step is to create a User Group and assign it to the functional


area.

Now go to PART II if you are creating a Query with Logical Database

CREATING AN FUNCTIONAL AREA ( without a Logical Database)

We will now see how to create a Functional Area without a Logical database.

We can create a functional area without a logical database using a program or a


sequential set or table (Direct Read) or using table joins.

The following steps show you how create the FA using table joins. In order to
create a FA using a table join, we have to keep in mind that the tables that are
used have at least one field in common (i.e. the field name should be of the
same name, domain / data element). To create an functional area without a
logical database (using table join) do the following :

Ü To create an Functional Area choose Tools à ABAP/4 Workbench à Utilities


à ABAP/4 Query à Functional Areas

Ü Give an Functional Area name and Click on Create button.

Created / Compiled By : P. M. V. Subba Rao 5


SAP R/3 Document – ABAP/4 Query

Ü A functional area is the definition of the fields in the query.

Ü In the next screen give a description to the functional area. A functional area
can be created with a logical database or without a using a logical database.

Ü 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.

Ü In the Joined Tables area give the table names which you want to include in
the join condition and press the Enter key.

Ü After you press the enter key a check box will appear against the table names
(left side), three radio buttons will appear against the tables (right side)
specifying the join type.

Ü The base table name will be grayed out. Now select two tables by selecting
the check boxes for defining the join condition.

Ü To define the join conditions choose EDIT à Join à Define condition.

Ü You will see a mapping between the tables on the right hand side under the
Join Conditions area. Click on the button (with + and down arrow symbol) to
specify the join between the tables.

Ü You will get a message “Proposals Requested”. Click on Yes.

Ü 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. In the boxes against the fields.

Ü Click on Back arrow button to come back and continue defining the
conditions for more tables if required.

Now proceed with PART II if you are creating a Query without a


Logical Database

Created / Compiled By : P. M. V. Subba Rao 6


SAP R/3 Document – ABAP/4 Query

Ü Click on Functional Group button on the application toolbar to create the


functional group for the fields from the tables in the logical database.

Ü Window : Change Functional Area <Functional Area name>

Ü In this screen in the Functional Groups box mention the functional Group
number and description ( eg. 01 – Flight, 02 – Demo, 03 – Bookings etc.).

Ü Tables of logical database / Joins show the tables from the logical database.
The fields from the tables are displayed in the Fields box.

Ü To change the list double click on the table name.

Ü In the Fields box against the fields specify the functional group number in
which you would like to include the field.

Ü If the list of fields in the fields box is not completely displayed then to display
the entire list of fields or to have broader display of place the cursor in the
fields box area and click on Settings à Full Screen from the menu bar.

Ü Do 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.

Ü Save the Functional Area and Generate it. Click on the SAVE icon and
then on Generate icon on the toolbar to save and generate the functional
area.
DON’T FORGET TO GENERATE THE FUNCTIONAL AREA.

Ü You can add additional fields (user defined fields), additional tables and
assign them to any table in the logical database. These additional fields can
be seen from the fields’ list of the assigned table.

Ü To add additional fields from the menu bar choose GOTO à Additional
Field

In the next screen that you get, give the field name and the table name from
the logical database in which this field has to include.

Created / Compiled By : P. M. V. Subba Rao 7


SAP R/3 Document – ABAP/4 Query

Click on the enter icon.

In the next screen specify the Sequence, Description, Heading, technical


attributes for the fields like field type, length etc. and then you can also
specify any formula for the field.

Save the field details.

You can do the same for any more fields, which you would like to include in
the query.

If you create two additional fields, and the second field uses the first field in
its code then the sequence of the second field should be higher than the
sequence of the first.

Ü You can also include tables. Choose GOTO à Additional Tables

Ü You can also include your own selection criteria and parameters for
executing the query other than default selection screen and parameters

If you include your own selection criteria and parameters then you have to
write a code for them to take any effect.

If you define Parameters as part of your selection screen you must also
evaluate them in functional area code otherwise they will have no effect.

Note: Please the online documentation for more information on this.

Ü You can also write Code for the query that is to be executed at the time of
executing the query. Choose GOTO à Code

What code you want to write is up to you and the output of query you
design.

The point at which an ABAP/4 Query reads an additional table or performs


calculations on additional fields depends on logical database table since the
associated ABAP/4 code becomes part of the GET event processing of the
table.

If you want to display something before the execution of the query /


accessing the logical database, you write the code for that in START-OF-
SELECTION (Goto à Code à START-OF-SELECTION).

Created / Compiled By : P. M. V. Subba Rao 8


SAP R/3 Document – ABAP/4 Query

If you want display something before or after the output of the query, you
write the code for that in END-OF-SELECTION.

If you want to display something at beginning of the page then you write the
code for that in TOP-OF-PAGE.

Ü Save and generate the functional Area.

Ü Click on Back icon to come out.

Ü You can also define local fields for the functional area. The definition of local
fields allows you to generate new information from the fields in a functional
area, without having to include an additional field.

Ü To define a local field, choose Edit à Local field à Create on the Select
Field screen.

Ü When making this definition, the following information is needed:

à Short name

à Field name
Here, you enter a text which describes the field contents. On all
subsequent screens, the local field is identified via this name.

à Header

This is used when calculating column headers. Please note that headers
should correspond to the field output length and that they may extend
over two lines.

à Functional group

The local field is included in the functional group.

à Attributes

When defining the technical attributes of the local field, you can use any
of the following options:

– Refer to an existing field (i.e. use it as a reference field)


The advantage of this option is that the local field can accept the
same values as the reference field. If the reference field is a
currency amount field or a quantity field, the local field inherits
the currency or unit assignment of the reference field. In our
example, the field Distance with the short name DISTANCE is a

Created / Compiled By : P. M. V. Subba Rao 9


SAP R/3 Document – ABAP/4 Query

quantity field, since it contains a distance specification and a


measurement unit. Therefore, the local field SPEED is also a
quantity field and has the same measurement unit as the field
DISTANCE.

– Define the field as a text, calculation, date or time field.

With text and calculation fields, you must specify the field size
(number of characters/digits and number of decimal places).

– Define the field as a symbol or icon

With these fields, the contents are interpreted as a symbol or icon


and output is consequently in graphical format. You could do this
if you wanted to emphasize particular values or lines in the list.

- Calculation formula

You can determine the value of a field in either of the following


ways:
1. By using a calculation formula.
In the most simple case, a calculation formula consists
of a single formula. All formulae conform to the usual
mathematical rules and contain operands and operators.
– Valid operands include the short names of fields as well as
numeric constants (e.g. 10 or 1.5) and character strings (e.g.
‘ABC’).

– Certain special fields are also available. These are:


%NAME(the name of the user processing the query)
%DATE(the current date when the query is being processed)
%TIME(the current time when the query is being processed).

– If an operand is a text field, you can use the notation textfield


n:m to access part of this field. Here, n is the position of the
first character and m is the position of the last character.
If you are accessing the 2nd character to the 5th character of
the field, the notation would be text 2:5.

– If an operand is a date or time field, you can use the following


notation to access the individual components of this field:
date field [YEAR] year
date field [ MONTH] month
date field [DAY] day
time field [ HOUR] hours
time field [ MINUTE] minutes
time field [ SECOND] seconds

Created / Compiled By : P. M. V. Subba Rao 10


SAP R/3 Document – ABAP/4 Query

– Valid operators include the basic arithmetic operations plus DIV


and MOD. DIV is the operator for whole number division and
MOD is the operator for the remainder in whole number division.

– You can use parentheses in the usual way.

Next you create a user group. In the user group you specify the users who are
authorised to use the queries under that user group. You associate a user
group with Functional Areas

CREATING A USER GROUP


Ü From the menu bar choose Environment à User Group

In the next screen give a user group name .

In the user group, you specify the names of the users who are authorized to
use this functional area / query.

Ü Click on Create button

Ü Give a description to the user group and specify the names of the users.

Ü Click on the Assign Functional Area button on the toolbar to assign the
functional area to the user group.

Ü Save the User group and the come out by clicking the back icon.

Next step is to create a query.

Created / Compiled By : P. M. V. Subba Rao 11


SAP R/3 Document – ABAP/4 Query

CREATING A QUERY
Ü To create a Query choose Environment à Queries

Ü Give a Query name and Click on Create Button.

Ü Select the functional area for the user group by double clicking on it or by
clicking on the enter icon.

Please note that a user group can be assigned to any number of functional
areas, which could include functional with logical database and without
logical database.

Ü In the next screen give a description to the query, specify the output length (
if required) and select the processing option from the further Processing
Options box. You can display the data as a table, download it to a file,
display in a word processor etc.

Ü Click on the Next Screen icon ( à ) on the toolbar.

Ü SELECT FUNCTIONAL GROUP screen.

The list of Functional Groups that were defined in the functional area is
displayed. Select the ones required. The fields from this groups will only be
displayed in the next screen.

Click on the check boxes to select the functional groups.

Ü Click on the Next Screen icon ( à ) on the toolbar.

Ü SELECT FIELD Screen.

The fields from each functional groups is displayed. Select the fields that
you want to include in your query report.

Here in this screen, you can do the following if required :

• You can specify Short names for the fields.


Choose Edit à Short Names à Switch On/ Off

• You can also change the selection text contents to the way you want it to
appear in the selection screen.

Created / Compiled By : P. M. V. Subba Rao 12


SAP R/3 Document – 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.
Choose Edit à local field à Create

You can include fields such as user name, system date, time etc.

• You can also maintain column headers for the fields. Select the field and
then choose Edit à Column Header à Maintain

Ü Click on the Next Screen icon ( à ) on the toolbar.

Ü SELECTIONS SCREEN . In this screen click on check boxes against the


fields.

Ü Now you have to select the Query Report type (Basic List, Statistics or
Ranked List) that you want to generate.

Ü Click on Basic List.

Ü BASIC LIST LINE STRUCTURE Screen. In this screen you need to do the
following :

• Specify the lines on which the fields have to appear on the report
layout
• Specify the order in which each field has to appear
• Specify the sort order ( if needed )
• For the numeric fields in the list, check the check box against the
fields if you want to have the totals of the field in the output.
• For better looking output you can also check the Basic list with box
and Columns separated by | check boxes on the top of the screen

Ü Click on the Next Screen icon ( à ) on the toolbar.

Ü CONTROL LEVELS Screen. In this screen, you can do the following ( if


required ) :

• Specify the sort order as descending. Default is ascending.


• Click on Text check box if you want to have a Sub-heading for the
selection for the fields
• Total for each field that is selected for sorting
• If you click on the Box check box then the output will be in box for
the fields against which the box check box is checked.
• If you click on the BlnkLn check box then there will be line after the
output of fields against which the BlnkLn check box is checked

Created / Compiled By : P. M. V. Subba Rao 13


SAP R/3 Document – ABAP/4 Query

• Click on New Page to get the output for the fields against which New
Page check box is checked on a new New Page

Ü Click on the Next Screen icon ( à ) on the toolbar.

Ü LIST LINE OUTPUT OPTIONS Screen. In this screen you can specify the
background color for the display of the output by selecting the color of the
Header line in the output.

Ü Click on the Next Screen icon ( à ) on the toolbar.

Ü FIELD OUTPUT OPTION Screen. Here you can do the following if required :

• change the output length of the field (s),


• specify new position of display for the fields,
• if you have any Quantity fields or currency fields then you can specify
the position on display of the unit ( Left radio button – Unit appears
before the figure, Middle Radio button – Unit appears after the figure
and Last Radio button – Unit does not appear).
• Under Format you can specify the color of the column for each field.
• If you want to have a label against the output of sort fields click on
template check box and in the next screen that you get give the label
name.

Ü Click on the Next Screen icon ( à ) on the toolbar.

Ü BASIC LIST HEADER. This screen gives you the layout display of the
selections that you have made for the query. Here you can

• Give a Page Header and Pager Footer to Query


• Change the field Labels. Place the cursor on the field and choose Edit
à Column Header à Maintain. Change the label and click the
Enter icon
• In the Page Header and Page Footer section, you can include or delete
lines. Choose Edit à Line à Insert / Delete.
• You can include the user name and date by specifying &N and &D
respectively.

Ü Save the Query now.

Ü Click on the Execute button twice to run the Query.

Created / Compiled By : P. M. V. Subba Rao 14


SAP R/3 Document – ABAP/4 Query

NOTE :

YOU CAN DO THE ABOVE PROCESS FOR CREATING QUERIES WITH


RANKED LISTS AND STATISTICS LIST. THE PROCESS IS THE SAME
EXCEPT THAT WHEN DEFINING THE QUERY YOU CHOOSE EITHER
RANKED LIST OR STATISTICS LIST IN PLACE OF BASIC LIST.

RANKED LISTS
Ranked lists are special types of statistics. Here, numeric values are also
summed for key terms and displayed in a table. However, sorting is always by a
numeric value known as the ranked list criterion. Additionally, only a certain
number of items are output. This makes ranked lists suitable for analyzing
questions such as: "What are the 10 flight connections with the highest sales?"

First, you must assign a title to the ranked list. This is necessary, since one
query can contain several ranked lists. You can then specify how many entries
(i.e. output lines) you want the ranked list to have. The proposed value here is
always 10.

Subsequently, you must define which fields are to be output and in what order.
To do this, enter sequence numbers in the first column. You select one of these
fields as the ranked list criterion. In our example, it is the field Free seats.

The ranked list criterion is the sort criterion of the ranked list. The default sort
sequence for the sort criterion is descending order, but ascending order is
sometimes necessary. This would apply, for example, to vendor sales figures
which are stored as negative amounts. In such cases, you can specify ascending
order for the ranked list criterion by selecting the column Asc.

You can also specify an output length and a rounding factor. As with statistics,
currency fields and quantity fields require you to specify a reference currency or
a reference unit which is used to convert all the amounts. Conversion errors
also have the same procedure as statistics

As with statistic, you can access the screens for maintaining the header and
setting graphics parameters by following the normal sequence of query screens.
The same rules apply for both these screens.

If you want to define another ranked list, you choose the Next ranked list
function.

Created / Compiled By : P. M. V. Subba Rao 15


SAP R/3 Document – ABAP/4 Query

Retrieving Data using a Program


If you want to create a more sophisticated Query, which you cannot achieve,
using ABAP Query’s automatic data retrieval facility then, again proceed as you
would for creating a functional area. On the Title and Database screen, specify
a structure in the field Table and select the field Data retrieval using program:

The system will give you a report name by default, which you can overwrite.

If you use the component Maintain Queries to create a query for this functional
area, ABAP Query uses the report as a model when generating the query report;
the model report itself thus remains unchanged.

The report that you would be using to retrieve the data should be created before
hand because generating the functional area for the first time , the report has to
be present. The report must be free of syntax errors and have the same fixed
point arithmetic setting as the functional area.

The following is an example of the structure of the model report and the
sequence of its components conform to a specific form :

Report xxxxxxxx.
TABLES tab. Define Dictionary structure used to set up the functional area. This
field string must contain the records to be evaluated.

PARAMETERS:... Define parameters, selection criteria, and fields.

SELECT-OPTIONS:...

DATA: ...

DATA: BEGIN OF itab OCCURS xxx. If necessary, define an INCLUDE STRUCTURE


tab. internal table itab with the

DATA: END OF itab. structure tab to hold the records to be evaluated.

* <Query_head> This comment must always appear after your data declarations.

* Code to define the table itab, if such a table is used.

Created / Compiled By : P. M. V. Subba Rao 16


SAP R/3 Document – ABAP/4 Query

Beginning of a loop to retrieve each record and place it in the field string tab

SELECT, DO, LOOP, ...

* If necessary, code to format data

* <Query_body> This comment must always be the last 'statement’ in the loop.
*The data must now be in the field string tab.

• End of loop to retrieve each record

ENDSELECT, ENDDO, ENDLOOP , ...

The two entries i.e the two comment lines *<QUERY_HEAD> and
*<QUERY_BODY> in the above example, are fixed should be there in your
ABAP report if you want to build a ABAP Query using and ABAP/4
program. They start immediately after the character "<", but the system
does not distinguish between upper and lower case.

AUTHORIZATIONS IN ABAP/4 QUERY :

End users, system administrators and translators must all have the appropriate
authorizations to use ABAP Query.

There are two means of assigning authorizations to the users :

Ü User groups

In order to create a query and maintain it, the user should be a member of
at least one user group. Each user can work with the queries of the user
groups to which he / she is assigned. Thus your access is restricted to
specific functional areas (logical databases).

Ü Authorizations

A user can be given the authorizations to a query by using the authorization


object S_QUERY.

Like every authorizations object, this authorization object also contains a


field ACTVT, which can accept the values Change (02), Maintain (23) and
Translate (67). You can assign authorizations for this authorization object.

Created / Compiled By : P. M. V. Subba Rao 17


SAP R/3 Document – ABAP/4 Query

Depending on what the user values set in ACTVT field the user can
manipulate / create the queries.

The default values of authorizations for the authorization object S_QUERY


are:

Ü S_QUERY_ALL : Change, Maintain and Translate


Ü S_QUERY_UPD : Change and Translate

Ü When you have chosen a user group, you see the names and titles of any
queries already defined there in the lower part of the screen.

Ü You can display a list of queries for your current user group. To do this,
proceed as follows:

Choose Environment à Directories à Queries/user group, or

Place the cursor on the input field for the query name and display a list
of possible entries by pressing F4 function key or by clicking the arrow
on the field.

Ü If differences occur between queries and functional areas, you should


terminate the processing and perform a comparison between the query and
the functional area.

Ü To perform a comparison, select Query à Other functions à Compare.

You then see a list of all the fields defined differently, together with information
about how the field definition has changed and where in the query the field is
used. If you wish, you can carry out an automatic comparison for individual
fields.

Ü If you want to execute the query as a background job, choose Exec. in


background.

To do this you would require variant.

Created / Compiled By : P. M. V. Subba Rao 18


SAP R/3 Document – ABAP/4 Query

Drill-down functionality in ABAP/4 Query


You can also generate Drill-Down report using ABAP/4 Query.

What you need to do is create at least two functional groups with fields from
different tables (E.g. SPFLI, SFLIGHT and SBOOK). These tables should have a
foreign key relationship with each other.

Create the query with multiple line basic lists.

A multiple line basic list is a list containing several lines with a different
structure.

While creating a Query, select the functional groups and the fields from these
functional groups.

In the BASIC LIST LINE STURCTURE screen, assign different line nos. to the
fields from each table and the sequence of the fields on each line.

Also mark the Compressed Display check box on top of the screen.

Now execute the Query and after the first level of report, double click on one of
the lines on of the displayed list. If data exists for the line selected then you
should get the next level of display.

You can expand or decompress the list by clicking on the Basic List button o
the application toolbar.

Calling Other Reports


Reports residing in different applications can call each other in the R/3 System
across the Report-Report-Interface RRI

Reports are called using the interface either over the menu path Goto à Call
report or by double-clicking (F2) on the appropriate line. Before a further report
can be called successfully, the query (or query report) has to be entered in the
interface as sender together with the recipient reports assigned to it

Created / Compiled By : P. M. V. Subba Rao 19

Das könnte Ihnen auch gefallen