You are on page 1of 2

ATS APP. PROG.

ABAP PROGRAMMING

UNIT: ABAP REPORT DEVELOPMENT


MODULE: INTERNAL TABLES

Exercise 18: Create a Ranked List for Highest Sales


Estimated Completion Time: 50 minutes

Overview
This exercise requires participants to declare a standard internal table, transfer
data to an internal table, and retrieve data from an internal table (LOOP AT
statement). Participants also use the SELECT INTO TABLE statement.

Instructions
The program name is ZSER18## where ## is the last 2 digits of your User Id.
1. Create a ranked list of the top five carriers, connection, and flight date,
with the highest payment sum for a selected carrier (see sample output
below).
2. The user enters the carrier on the selection screen as a parameter.
3. Use the event AT SELECTION-SCREEN to validate the user has entered a
valid carrier on the selection screen. If the user does not enter a valid
carrier, output an error message using the MESSAGE statement.
4. Use a standard internal table with a work area for table manipulation.
5. Within the START-OF-SELECTION event, use a SELECT.INTO TABLE
statement to select the carrier, connection, flight date, and payment sum
from SFLIGHT where the carrier code equals the carrier code entered as a
parameter. The selected fields are stored in an internal table.
6. Verify the internal table contains rows, sort the table by payment sum field
in descending sequence, loop from index 1 to 5, and display the results.

Hints
For more information on the SELECT, SORT and LOOP refer to
on-line help.

Z16830
2005 Accenture. All Rights Reserved.

273098304.doc

ATS APP. PROG. ABAP PROGRAMMING

Z16830
2005 Accenture. All Rights Reserved.

UNIT: ABAP REPORT DEVELOPMENT


MODULE: INTERNAL TABLES

273098304.doc

You might also like