Exercise (Chapter 7):
In these exercises you will write programs to help you to understand internal tables with and without header lines.
Objectives
After completing this exercise, you will be able to:
Understand how internal tables work and the differences between internal tables with and without header lines.
Estimated time to complete this exercise: 30 minutes
Exercises
The following exercises provide practice working with the concepts learned in Chapter 7 and Chapter 7a.
Exercise 1:
Name your program YIN010_XX. The efficiency experts have looked at your programs and have decided that hitting the database repeatedly with the select statement is extremely inefficient (I know, I was shocked too). They suggest you take all the information from the list you created for the last exercise (program YIN009_XX) and first put it into an internal table before writing it out to a report. Create and populate an internal table that will hold the information you would like to select from the database. First create an internal with a header line, next, change your program to use an internal table with a separate work area. Refer to Program YIN010 for solutions to both methods.
Exercise 2
Copy your last program as YIN011_XX. Write a program identical in purpose to YIN009_XX but using the internal table you created in YIN010_XX. Also, you should change the ON CHANGE OF statement to an AT…ENDAT statement. The output should be identical. Refer to Program YIN011 for the solution.
Introduction to ABAP ABAP Exercises
Exercise
Chapter 7