6/10/2011

SAP-Table Copy Capability

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:

· Copy existing tables in the Data Dictionary

· Add data to your table

· Create a structure and include it in a table

· Use the Object Information System to research objects created and maintained in the SAP system

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.

span style='mso-ignore:vglayout;;z-index:4;margin-left:-16px;margin-top:125px;width:78px;height:66px'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.

http://www.cadfamily.com/html/Article/SAP-Table%20Copy%20Capability_608_1.htm

No comments: