Professional Documents
Culture Documents
Internal Tables
ABAP Basics – Internal Tables
2.
a. Create an internal table to store the following data.
3.
a. Create an internal table to contain the following purchase details and populate
the internal table.
b. Create an internal table to contain the following customer details and populate
the internal table.
- Page 1 of 9 -
ABAP Basics – Internal Tables
c. Process the internal tables and get the following output from Purchase details
table (only).
4. Create an internal table to contain the following data and populate it:
a. Display the following details from internal table. (Don’t use WHERE clause)
AA 0026 04.08.1999
b. Display all the “Lufthansa” flights’ information.
c. Display all the flights’ information that are scheduled after 01.05.2000.
a. Filter the contents to get the following output. (without using the where clause
in the LOOP AT statement).
DL 0009 100 150
DL 0009 100 150
UA 1914 300 300
UA 1914 300 300
- Page 2 of 9 -
ABAP Basics – Internal Tables
6.
a. Create an internal table to contain the following data and populate it.
7.
a. Create a nested internal table to contain the following data and populate it.
- Page 3 of 9 -
ABAP Basics – Internal Tables
b. Get the output in the following format: if a student gets less than 40 marks
in any subject indicate it.
8.
a. Create an internal table to hold the following data.
b. Display the contents of the internal table in the following tabular format.
9.
a. Create a field string of the following structure:
- Page 4 of 9 -
ABAP Basics – Internal Tables
Customer number Customer name Amount
C001 JOHN 5000
C002 MIKE 2000
C003 ARNOLD 3000
C004 ADAM 1000
C005 TOM 2000
C006 PATRICK 6000
C007 ROBERT 12000
b. Create an internal table using this structure and populate it with the above data.
c. Display the contents of the internal table as follows:
C007 ROBERT 12,000
C001 JOHN 5,000
C006 PATRICK 6,000
C002 MIKE 2,000
C005 TOM 2,000
C003 ARNOLD 3,000
C004 ADAM 1,000
d. Delete all customers whose amount is greater than 3000 and output the contents
of the internal table.
10. Create an internal table to hold the following data. Ensure that there is no include
statement or occurs clause in the program. Display the contents of the internal
table.
- Page 5 of 9 -
ABAP Basics – Internal Tables
a. Without sorting the above internal table display the employees who belong
to the same department together.
12. With out using the COLLECT statement display the output specified in question
#2.
13. Create two internal tables with the same structure and populate them with the
following data.
Airline Flight
carrier id connection id
AA 0017
AI 0021
DL 1984
UA 0941
LH 1699
Airline Flight
carrier id connection id
AA 0017
DL 1984
LI 0263
LH 1699
Store all the records that are present in only one of the above internal tables, in
another internal table, as follows:
For the “table row” column, using A for the first table and B for the second table,
concatenate it with the row number of the record in the corresponding internal table.
14. Create two internal tables with the following structures and populate them as
follows:
Cust Id Name Hno Street City State Pin
1001 Rajesh 12 Wellington Road Hyd AP 500033
1002 Dravid 103 Arlington Road AP 500026
1003 Sachin 99 Gandhi Marg Secd AP 500021
- Page 6 of 9 -
ABAP Basics – Internal Tables
Cust Id Item
1001 P0001
1001 P0002
1001 P0003
1001 P0004
1001 P0005
1001 P0006
1001 P0007
1002 P0001
1002 P0002
1003 P0001
1003 P0002
1003 P0003
1003 P0004
- Page 7 of 9 -
ABAP Basics – Internal Tables
Output the contents of the internal table in the following format:
Dept No
10
Rama Clerk 3000
Reshma Manager 35000
Raksha Accountant 5000
Rani Clerk 3000
20
Reema Manager 25000
Roma Accountant 4000
Ria Clerk 2000
Material
Purchase order PO Date Quantity Unit
MAT_001
6001 04.03.2002 10 EA
6004 05.10.2002 15 EA
6002 01.19.2002 5 CA
- Page 8 of 9 -
ABAP Basics – Internal Tables
MAT_002
6006 01.30.2002 40 EA
6008 02.24.2002 5 EA
MAT_003
6003 01.19.2002 20 EA
6005 05.08.2002 6 CA
6007 02.24.2002 10 CA
********************The End*********************
- Page 9 of 9 -