Dictionary ChapterExercise


Exercise

Chapter 6

Exercise (Chapters 4-6):

In this exercise, you will practice manipulating existing tables, their structures, and their data.

Objectives

After completing this exercise, you will be able to:


If you need help with this exercise, the solutions can be found in Development Class YDATADICTIONARY.

Estimated time to complete this exercise: 40 minutes

Exercises

The following exercises provide practice working with the concepts learned in Chapters 4-6.

Chapter 4, Exercise 1: Table Copy Capability

Often times you must create a table and there is already a similar table in the database. So why reinvent the wheel? In the ABAP Workbench you can create a table and then copy the elements of another table into your new table. Additionally it is possible to copy complete tables and then add fields.

Step 1. Using the Object Navigator, locate the table called KNA1. Follow the menu path: Tools ! ABAP Workbench ! Overview ! Object Navigator

Pull down the Workbench menu and select Other objects… Select the Dictionary tab from the pop up screen and enter “KNA1” in the Database table field.

Step 2. Click the Copy icon on the toolbar at the button of the screen.

In the COPY TABLE box that appears, enter YXXKNA1 as the new table name. Then click the green check mark.

Step 3. Enter your development class and change request when prompted.

Question 1: To what development class does the original KNA1 table belong?

Step 4. Using the Object Navigator, navigate to your development class to ensure that YXXKNA1 was created correctly.

Hint: You may need to refresh the object list in the Object Navigator.

Chapter 5, Exercise 1

In this exercise, you will add data to the YXXCUSTMASTER and YXXCUSTDISCOUNT tables you have created. Now write down two fictitious customers. Give them customer numbers, first and last names.

0x08 graphic
0x08 graphic
Use Tools ! ABAP Workbench ! Overview ! Data Browser (transaction SE16) to add records to your customer and customer discount tables. Use F5 or click on the Create Entries push button, shown by the arrow line below, to add records to your tables.

Step 1. The Table YXXCUSTMASTER Insert screen will appear. Add data to the YXXCUSTMASTER table, type in your fictitious customer numbers, first and last name and click the save button. You should get “Database Record Successfully Save” message. Add the second customer to the YXXCUSTMASTER table.

Step 2. Repeat the above steps to add data in to YXXCUSTDISCOUNT table based on the entries you made in the YXXCUSTMASTER table.

Chapter 5, Exercise 2

The exercises for this chapter will familiarize you with creating and using structures (tables of type INTTAB) in SAP. You will create an address structure

Your customer table, YXXCUSTM, does not yet contain information about customer addresses. Because address information is likely to be stored in several tables (for example, in vendor tables as well as the customer table), you will create a structure to provide the appropriate field definition. That structure can then be included in the customer table, as well as into any other tables where it may be needed in the future.

Step 1. Create the structure YXXADD:

Follow the menu path: Tools ! ABAP Workbench ! Overview ! Object Navigator. Pull down the Workbench menu and select Other objects… Select the Dictionary tab from the pop up screen and enter “YXXADD” in the Structure field.

YXXADD

Field Name

Data Element

Domain

Type

Length

ADDR1

YXXADDR1

CHAR50

pre-defined

pre-defined

ADDR2

YXXADDR2

CHAR50

pre-defined

pre-defined

CITY

YXXCITY

CHAR50

pre-defined

pre-defined

REGION

YXXREGION

CHAR10

pre-defined

pre-defined

POST_CODE

YXXPOSTCD

CHAR15

pre-defined

pre-defined

COUNTRY

LAND1_GP

pre-defined

pre-defined

pre-defined

ADDR1 is the first line of the address.

ADDR2 is the second line of the address.

CITY is the city.

REGION is the province or state.

POST_CODE is the postal code.

COUNTRY is the country.

Step 2. Activate the structure

Step 3. Include the structure YXXADD in the table YXXCUSTMASTER. Do not forget to re-activate table YXXCUSTMASTER.

Chapter 5, Exercise 3

In this exercise, you will add data to the YXXCUSTMASTER table using the structure you created in the previous exercise.

Step 1. Go to transaction SE16.

Step 2. Enter YXXCUSTMASTER as the table name and click the Table Contents pushbutton on the toolbar, circled below.

0x08 graphic
0x08 graphic

Step 3. A selection screen appears. Click the Execute push button on the toolbar (or press F8) without entering any selection criteria.

Step 4. Click the checkbox for one of your entries, and then click the Change push button on the toolbar.

Step 5. Notice that you now have additional fields to enter the customer's address. Enter an address, and then save your work.

Chapter 6, Exercise 1

In this exercise, you will use the ABAP Repository Information System to research various objects created and maintained within SAP.

Complete the following queries using the ABAP Repository Information System.

1) Search for all tables beginning with the string KNA*.

2) Display field list for table KNA1.

3) Display only KNA1 fields with the string *Customer* in the short description.

4) Display all fields in tables beginning with KNA*, with CHAR data types, lengths less than 20, and *Customer* in the short description.

5) Display all tables that use the check table UPERS.

6) Display all search helps that begin with M*.

7) Find all data elements that use domain NUMC4.

0x01 graphic

The ABAP Dictionary ABAP Exercises

0x01 graphic

March, 2001

p:\instruct\courses\abap\bc030\Ch3ffEx.doc Page 7



Wyszukiwarka

Podobne podstrony:
Dictionary Chapter 07
Dictionary ChapterExercise
Dictionary ChapterExercise
Dictionary Chapter 02
Dictionary ChapterExercise
Dictionary Chapter 03
Dictionary ChapterExercise
Dictionary Chapter 01
Dictionary Chapter 04
Dictionary Chapter 08
Dictionary Chapter 05

więcej podobnych podstron