Вы находитесь на странице: 1из 7

DATA DICTIONARY

CONTENT 1) TABLE AND ITS TYPES 2) TABLE CONTENT 3) DATA ELEMENT AND DOMAIN 4) COMMANDS FOR TABLE CONTENT DATA DICTIONARY It is a place to define data objects in sap. Using DDIC we can create and store data objects like STRUCTURE, TABLE and VIEWS. Difference between structure and table in data dictionary A table is associates with the underlying data base associate with it whereas the structure is not. Types of tables in data dictionary 1. Transparent table 2. pooled table 3. cluster table Transparent Table By its name we can say it is same table as of database table. It has one to one relationship with a table in the database. Its structure in DDIC corresponds to a single database Database table has the same name, same name and number of fields as of DDIC table They are used to hold the application data .

Application Data: An application data is the master data or transaction data. For eg in CUSTOMER table customer master data or in VENDOR table vendor master data.

Pooled Table: It has many to one relationship it means for one table in database it has many R/3 data dictionary table. It has different number of fields and different names also.

Table Pool When in a single pool different pooled table(in data base) combines it is known as the table pool. It provides us the structure which can hold different fields from different tables. R/3 uses table pools to stored different number of small tables. SAP uses it for the storage of the system data like system configuration information.

Cluster Table Table cluster contain fewer table than the table pools. The primary key in the cluster table begin with the same name and same field or fields. It is advantageous at the place when we want data from different table simultaneously and those table have at least one primary key common between them.

Table - Any data dictionary comprises of fields for eg. TABLE- LFA1 contains the fields MANDT. - This fields are linked with the DATA ELEMENT which contains label and f1 help of field for same eg MANDT field label is CLIENT and it also has its own f1 help. - Now this created DATA ELEMENTS will be linked to DOMAIN, which contains characteristics of any field like DATA TYPE and LENGTH.

Domains and Data Elements are reusable: A domain can be used for more than one data element for e.g if you have created a domain ZPHONE which has data type CHAR and length 25 , than this domain can be used for different data element such as ZPHONEW(WORK PH.NUM) ZPHONEH(HOME) etc etc. Here ZPHONE is the generic domain for the different data elements. Data element is reusable because we can use same data element to create different fields of table. Change in domain characteristics once done, it will automatically reflect to the whole fields with whom this domain is linked. - For the above eg. ZPHONEW (work ph.no) can be used by different fields such as MANDT, LIFNR ETC. When to create and reuse the domain and data element - There are already SAP define 13000 + existing domains available. - We need to find whether our field required new domains and data element or not by analyzing the technical needs like LENGTH & DATA TYPE as of for domain and FIELD LABEL AND F1 HELP (DOCUMENTATION) as of data element. Naming convention for the domain, data element, field name and table name: Other than field name everything should start with Z or Y. Maximum name length (Domain, DE, FN and TN) should be not more than 10. -

In creation of transparent table if the table holds the application data, it is client dependent table and for this the first field is always MANDT.

There are two approaches to create table 1) Bottom up: we create domain then data element then the table. 2) Top down: For top down we create table than data element than the domain.

Generally we follow top down approach to create data element and domain. TABLE CONTENT COMMANDS Adding data to custom made table (say ztest) Go to utilities table content Create entries save and activate. COPYING EXISTING TABLE - Just type the name of radio button table and click on the button copy (cntrl+f15) it will ask for from and to. Delete Existing Table - Just type the name of table by clicking on the radio button table and from application toolbar use delete button (shift+f2) to delete it. Inserting Fields in the internal table: Inserting: Inserting any field can be done by clicking insert field button in the application toolbar. With the help of insert we can only insert already existed field in the table.

Appending Fields in the internal table: Appending: Appending any field can be done by clicking new field button on the application toolbar. Append Structure

General Data Browser utilities SE16 With the help of SE16 browser we can : - Create data entry - Change existing data entry - Change multiple rows - Delete - Sort - Find - Download to presentation server. SM31 and SM30 also used as a data browser Summary
The Data Dictionary is a tool used by ABAP/4 programs to create and maintain tables. There are three types of tables: transparent, pooled, and cluster. Transparent tables are the most common and are used to contain application data. Pooled and cluster tables are primarily used by SAP to contain system data.

To create a table, you first need domains and data elements. Domains provide the technical characteristics of a field; data elements provide the field labels and F1 help. Both are reusable. Data browsers enable you to display and modify the data within tables. SE16 is the most general data browser. SE17, SM30, and SM31 are the other browsers that offer varying capabilities

Part-2 DATA DICTIONARY Special Table fields Structures in data dictionary Includes Table indexes Technical Settings Special Table Fields Currency field: This will contain the quantity or amount of currency. For eg. You go in a bank and ask for 1000$, among this 1000 is quantity or amount and $ is currency code. The data type of currency field must be CURR in domain. It must be link to the data type CUKY containing the currency Key.

Currency Key (code) field: This will contain the code of currency as $ in the above given example. Now if you want to connect the currency field with the currency key field (in the same table or with other table): You need to double click on currency field (WEBTR) and in reference field for currency amount just type the ref table name and ref field name (WAERS). Quantity Field: This will contain the quantity or amount of measurement. For eg when we talk about 1000 meters than among this 1000 is quantity field and meters is quantity key field. The data type of quantity field must be QUAN field. It must be link to the data type UNIT containing the quantity key.

Quantity key field: This will contain the unit of measurement (meter/cm) Structures in data dictionary When a group of field combined together under a common name it is called as structure. The naming convention of structure is same as the transparent table. Any structure and table cannot have the same name. We can use same structure in two different programs.

Difference between structure and tables: Structure does not associate with the database table whereas tables are. Structure does not have primary key whereas tables have. Structure does not have technical attributes such as data class, buffer, restriction allowed on maintenance.

Concept of Includes A structure can be nested inside a structure or table. With the help of include writing in field column and structure name inside the data element column we can nest structure inside table or structure.

For eg. Some time we want a same customer address for different tables such as vendor table, customer master table, employee table than instead of writing it again and again we can create a structure which contain required field such as ( street, city, region, pin code) and we can use the same structure in the different table or inside structure also. Use of same structure multiple times We can include same structure multiple times in a table. Say for eg we make a structure which contain mail address now we want home address also of same structure (same fields) , instead of creating one more structure we can give the same of structure as INCLUDE-XXX this xxx would be any number so for table (eg) ztxa1 we can create structure INCLU-01 (for home address) INCLU-02 (for mail address).

Summary
Within a table, each currency field must be linked to a currency key field, and each quantity field must be linked to a field containing the units of measurement. Tables and structures are very similar. The main difference is that a table has an underlying database table and a structure doesn't. You can use structures to define identical work areas in multiple programs. You can include a structure within other structures and tables.

DATA DICTIONARY PART-3 Index Mechanism - An index is an efficiency mechanism used to easily finding rows in the table. - It is needed because data is stored in the table in the order in which it was added. - Index increases the performance tremendously it will use binary search mechanism to read the data. -Primary index is an index which is made for the primary key (it is automatically created) rest will be called as secondary index. - To see the index we can select indexes option from the application toolbar. - Maximum 9 secondary indexes can be created. Need of index with the help of an example Say we want to select a specific LIFNR entry 1050 in the table now if we directly use this is select command it will search in the whole list and find out the same, other hand if we have created index for

LIFNR and now we want to select specific LIFNR entry than this type instead of searching in whole table data it will search in the index of LIFNR.

Technical settings for any table Data Class Data class for technical setting of any table will determine the table space that the table is assigned to(use for oracle databases). Table space is a physical file that is used to hold tables. Every table is associated with the table space; tables with similar characteristics are usually grouped into one table space.

General data class: APPL0 or Master Data: This type of data class use for the tables which are not updated often and grow slowly for eg CUTOMER MASTER TABLE and VENDOR MASTER TABLE. APPL1 or Transaction Data: This type of data class use for the table which are updated often and grow fast for eg order placed with order or orders received from customer. APPL2 or Customizing Data: This type of data class use for the table content which are determined before implementation and do not change often after that. There are other type of data classes too which is used by SAP for their use.

DATA SIZE The size category enables you to find out the maximum number of records your table can hold. If the allotted extent (initial to final size) crossed than table space will be extend.

Buffering of tables Whenever we write any SQL statement it will go to the RAM of application server to find out whether data is available or not and if data is not available it will fetch the data from database. Now next time when you write same SQL statement instead of going to data base it will fetch data from the RAM of the application server. Advantages 1) The program using buffer data run faster because it should not need to wait for the data to come from the database. 2) It will improve the performance.

Table containing numeric data type cannot be buffered like CURR, DEC etc. ST02 transaction used to show buffer statistics.

Unread topics: 1) Buffering techniques 2) Foreign key concept 3) Indexes in detail

Вам также может понравиться