Intro to«AP ChapterExercise


0x08 graphic
Exercise (Chapter 6):

In this exercise, you will write a simple program to test your understanding of the select statement.

Objectives

After completing this exercise, you will be able to:

Estimated time to complete this exercise: 60 minutes

Exercises

The following exercise provides practice working with the concepts learned in Chapter 6.

Exercise 1:

Name your program YIN005_XX. Create the following output using a basic select * statement. We are only using select * because we are selecting all the columns from the table, otherwise using a field list would be much more efficient. Just a reminder that your data may seem incomplete due to the lack of data in the table. To make sure your results are correct, go to table YMOVIE, and then go to Utilities Table Contents and execute. Finally, you can compare the data in the table with your resulting list.

Don't forget to check sy-subrc to make sure that a record was successfully retrieved from the database. Let the user know if no records were found with a message based on the value of sy-subrc. Your output should resemble the screen shot below. Refer to Program YIN005 in Development Class YINTRODUCTION for the solution.

0x01 graphic

Exercise 2:

Create a new program and name it YIN006_XX. Using another select statement write out a list of all the winners of the best picture category. Refer to Program YIN006 for the solution. Your list should be similar to the screen shot below.

0x01 graphic

Exercise 3:

Now copy YIN006_XX as YIN007_XX and use a field list instead of SELECT *. Refer to Program YIN007 for the solution. You should get the same output as in the previous exercise.

Exercise 4

Copy your last program as YIN008_XX. The client has asked that that same list be produced, but this time, there should be formatting changes to more clearly highlight different records on the list:

For example, the movie winners in 1931 should not appear at all on the list created, the winners in 1932 (an election year) should appear in one color and the winners from the following year (1933) should be in another color, as should the winner from 1934.

Use control statements to code the request. Refer to Program YIN008 for one possible solution.

Hint: Use FORMAT COLOR <n>. to change the highlighting of the next outputted line. You may want to look into the MOD operator.

Exercise 5

Copy your last program as YIN009_XX. The client has also asked that there be a list NOT limited to the PIC category, and that an underline be placed between each new year, with two underlines occurring when any year had no categories associated with it. Refer to the graphic below for help and to Program YIN009 for one possible solution.

0x01 graphic

0x01 graphic

Introduction to ABAP ABAP Exercises

Exercise

Chapter 6



Wyszukiwarka

Podobne podstrony:
Intro to?AP ChapterExercise
Intro to?AP ChapterExercise
Intro to?AP ChapterExercise
Intro to ABAP Chapter 13
Intro to ABAP Chapter 07
Intro to ABAP Chapter 12
Intro to ABAP Chapter 15

więcej podobnych podstron