Monday, December 15, 2008

Tables

Tables

Table is a Collection of rows and columns.
It has an underlying database table associated.
It stores the description of the table


-> Tables can be defined independently of the database in the ABAP Dictionary.
-> The fields of the table are defined with their (database-independent) data types and lengths.
-> When the table is activated, a physical table definition is created in the database for the table
definition stored in the ABAP Dictionary.

-> The table definition is translated from the ABAP Dictionary to a definition of the particular database.

A table definition in the ABAP Dictionary contains the following components:
 Table fields - define the field names and data types of the fields contained in the
table
 Foreign keys - define the relationships between the table and other tables.
 Technical settings - control how the table should be created in the database.
 Indexes - To speed up data selection, secondary indexes can be created for
the table
The customer can modify SAP tables with append structures and customizing includes.
This kind of modification ensures that the customer enhancements are automatically
merged with the new versions of the SAP tables when there is a release upgrade.


Table Fields
You must define the following for a table field in the ABAP Dictionary:
 Field name: The field name can have a maximum of 16 places and may contain letters,
digits and underscores. The field name must begin with a letter.
 Key flag: determines whether the field should belong to the table key.
 Field type: data type of the field in the ABAP Dictionary.
 Field length: number of valid places in the field.
 Decimal places: number of places after the decimal point, specifying numeric data
types.
 Short text: short text describing the meaning of the field.

Types of Tables:

-> Transparent
-> Cluster
-> Pooled

Transparent Table
* 1:1 relationship with the R/3 DDIC and Database table.
* Both have
* same name,
* Same no. of fields,
* Field names is same
* Used for storing application data (Master/Transaction data)
* Ex: Vendor master data

Pooled Tables

* M:1 relationship between R/3 DDIC and database table.
* All have different names
* Different no of fields and different field names
* Used for system data

CLuster Tables

* M:1 relationship between R/3 DDIC and database table.
* All have different names
* Different no of fields and different field names
* But all have at least one common primary key
* All tables read at same time. hence efficiency increases and performance is improved.
* Used for system data(System configuration info/historical data/statistical data)



No comments:

Post a Comment