Tuesday, 7 January 2014

Working with Database Tables in SAP ABAP

Working with Database Tables in SAP ABAP

Making a Copy of a Table
This chapter will look at ways in which one can change the transparent tables created ear-lier. It is important to know how to do this, and the implications of adding and taking away fields for the underlying data in a database table.
Let’s take a look at the ZEMPLOYEES table created in Chapter 2. In the SAP GUI, key in transaction code SE11 to access the ABAP dictionary, then display the table

Working with Database Tables in SAP ABAP

It is important to realise that whenever one wants to change a database table, there is a risk of losing data, especially where key fields in the table are being affected. The database system itself will try to determine whether adjustments can be made by deleting and cre-ating new items which change the underlying database catalogue, or whether what has already defined has to be re-implemented.
Quite often, when working with large tables, one has to manage the manipulation of the data oneself, so as to be sure that data is not lost. Deleting fields is quite a simple task, the table structure and its contents can add certain complications. Before starting any data-base change tasks, it is important to mitigate against as many risks as possible, and start
by using a copy of the database table, allowing one to test out any changes one may want to make, without affecting the initial table and its underlying data.
When you copy a database table, it is only the structure itself which is copied, meaning only its properties - fields and so on, not the actual data.
Step back to the initial SE11 screen. With ZEMPLOYEES in the Database table field, click the Copy button, then give the new table of ZEMPLOYEES2. The ‘Create Object Directory Entry’ box will appear and as before, select ‘Local Object’
                     
                     
Working with Database Tables in SAP ABAP

Working with Database Tables in SAP ABAP

A copy of the table has now been created. Choose display at the SE11 screen and the copy will appear. The table’s status will read as ‘New’. It must be activated, so click the ‘Change’ button (the Pencil icon in the toolbar), and then Activate
        
Working with Database Tables in SAP ABAP

Note that all of the fields in the table, since they have been copied, are already active. This is why it is only the table itself which has to be activated here. If you try to look at the table, you will find there are no contents, because only the structure was copied, not the underlying data. To create records, from the ‘Utilities’ menu, select ‘Table Contents’ and then ‘Create Entries’ to display the screen where the records for the table can be created as before
             
Working with Database Tables in SAP ABAP


                        Insert some records, click the Contents button, and then view the new table
Working with Database Tables in SAP ABAP

Working with Database Tables in SAP ABAP

3 comments:

  1. This site is informative and I really liked the way of presenting the articles in this site SAP Simple Finance Training in Hyderabad

    ReplyDelete
  2. You provided good records on sap it definitely is thrilling and helpful for the folks that are attempting to find sap. it's far accurate area to locate information on sap, many thanks concerning discussing facts
    thank regards
    oracle fusion procurement online training
    oracle fusion procurement training

    ReplyDelete
  3. CALFRE is a leading oracle fuison Financials Training Institute. we offer this course through online we have great experience in succeeding students through online courses. we can calculate our performance through their honest comments in our sites in supporting our services. we have referral program so candidates can earn money through referral. you can share your live experience with other can generate you some money.



    Oracle fusion Financials Training in hyderabad

    Oracle Fusion Financials online Training in hyderabad

    ReplyDelete