Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

types of tables

Former Member
0 Kudos

Hello ABAP experts,

please correct me if i am wrong. we have 3 types of tables 1) transparent tables 2) pooled tables 3) cluster tables.

what is the difference between these type of tables.

Suggestions appreciated.

Thanks,

BWer

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI

can check with this too

Transparent table:

Tables can be defined independently of the database in the ABAP Dictionary. The fields of the table are defined together with their (database-independent) data types and lengths.

A table definition in the ABAP Dictionary has the following components:

Table fields: The field names and the data types of the fields contained in the table are defined here.

Foreign keys: The foreign keys define the relationships between this table and other tables.

Technical settings: The technical settings define how the table is created on the database.

Indexes: Indexes can be defined for the table to speed up data selection from the table.

There are three categories of database tables in the ABAP Dictionary.

A physical table definition is created in the database for the table definition stored in the ABAP Dictionary for transparent tables when the table is activated. The table definition is translated from the ABAP Dictionary to a definition of the particular database.

On the other hand, pooled tables and cluster tables are not created in the database. The data of these tables is stored in the corresponding table pool or table cluster. It is not necessary to create indexes and technical settings for pooled and cluster tables.

Pooled table

Pooled tables can be used to store control data (e.g. screen sequences, program parameters or temporary data). Several pooled tables can be combined to form a table pool. The table pool corresponds to a physical table on the database in which all the records of the allocated pooled tables are stored.

Cluster table

Cluster tables contain continuous text, for example, documentation. Several cluster tables can be combined to form a table cluster. Several logical lines of different tables are combined to form a physical record in this table type. This permits object-by-object storage or object-by-object access. In order to combine tables in clusters, at least parts of the keys must agree. Several cluster tables are stored in one corresponding table on the database.

more info

http://help.sap.com/saphelp_erp2004/helpdata/en/81/415d363640933fe10000009b38f839/frameset.htm

http://cma.zdnet.com/book/abap/ch03/ch03.htm

Check this links.

http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm

http://www.techinterviews.com/?p=198

Regds,

naveen

4 REPLIES 4

suresh_datti
Active Contributor
0 Kudos

Hi Bwer,

In simple terms Transparent Table is asingle table whereas the data from several tables is stored together in a table pool or table cluster. Pl see the following for addiiotnal info.

<a href="http://help.sap.com/saphelp_47x200/helpdata/en/81/415d363640933fe10000009b38f839/frameset.htm">Poole & Cluster tables</a>

Regards,

Suresh Datti

ferry_lianto
Active Contributor

Hi BWer,

You are right. There are three types of tables.

<b>1. Transparent Table</b>

Exists with the same structure both in dictionary as well as in database exactly with the same data and fields.

<b>2. Pooled Table</b>

Pooled tables are logical tables that must be assigned to a table pool when they are defined. Pooled tables are used to store control data. Several pooled tables can be cominied in a table pool. The data of these pooled tables are then sorted in a common table in the database.

<b>3. Cluster Table</b>

Cluster tables are logical tables that must be assigned to a table cluster when they are defined. Cluster tables can be used to strore control data. They can also be used to store temporary data or texts, such as documentation.

The major difference between transparent tables, pooled tables and clusterd Tables are:

A transparent table is a table that stores data directly. You can read these tables directly on the database from outside SAP with for instance an SQL statement.

Transparent table is a one to one relation table i.e. when you create one transparent table then exactly same table will create in data base and if is basically used to store transaction data.

A clustered and a pooled table cannot be read from outside SAP because certain data are clustered and pooled in one field.

One of the possible reasons is for instance that their content can be variable in length and build up. Database manipulations in Abap are limited as well.

But pool and cluster table is a many to one relationship table. This means many pool table store in a database table which is know as table pool.

All the pool table stored table in table pool does not need to have any foreign key relationship but in the case of cluster table it is must. And pool and cluster table is basically use to store application data.

Table pool can contain 10 to 1000 small pool table which has 10 to 100 records. But cluster table can contain very big but few (1 to 10) cluster table.

For pool and cluster table you can create secondary index and you can use select distinct, group for pool and cluster table. You can use native SQL statement for pool and cluster table.

A structure is a table without data. It is only filled by program logic at the moment it is needed starting from tables.

A view is a way of looking at the contents of tables. It only contains the combination of the tables at the basis and the way the data needs to be represented. You actually call directly upon the underlying tables.

Hope this will help.

Regards,

Ferry Lianto

Please reward points if helpful

Former Member
0 Kudos

Hi

The table type (and particularly the access method) that you will use depends on how the typical internal table operations will be most frequently executed.

Standard tables

This is the most appropriate type if you are going to address the individual table entries using the index. Index access is the quickest possible access. You should fill a standard table by appending lines (ABAP APPEND statement), and read, modify and delete entries by specifying the index (INDEX option with the relevant ABAP command). The access time for a standard table increases in a linear relationship with the number of table entries. If you need key access, standard tables are particularly useful if you can fill and process the table in separate steps. For example, you could fill the table by appending entries, and then sort it. If you use the binary search option with key access, the response time is logarithmically proportional to the number of table entries.

Sorted tables

This is the most appropriate type if you need a table which is sorted as you fill it. You fill sorted tables using the INSERT statement. Entries are inserted according to the sort sequence defined through the table key. Any illegal entries are recognized as soon as you try to add them to the table. The response time for key access is logarithmically proportional to the number of table entries, since the system always uses a binary search. Sorted tables are particularly useful for partially sequential processing in a LOOP if you specify the beginning of the table key in the WHERE condition.

Hashed tables

This is the most appropriate type for any table where the main operation is key access. You cannot access a hashed table using its index. The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always have a unique key. Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for processing large amounts of data.

Thanks

Sudheer

Former Member
0 Kudos

HI

can check with this too

Transparent table:

Tables can be defined independently of the database in the ABAP Dictionary. The fields of the table are defined together with their (database-independent) data types and lengths.

A table definition in the ABAP Dictionary has the following components:

Table fields: The field names and the data types of the fields contained in the table are defined here.

Foreign keys: The foreign keys define the relationships between this table and other tables.

Technical settings: The technical settings define how the table is created on the database.

Indexes: Indexes can be defined for the table to speed up data selection from the table.

There are three categories of database tables in the ABAP Dictionary.

A physical table definition is created in the database for the table definition stored in the ABAP Dictionary for transparent tables when the table is activated. The table definition is translated from the ABAP Dictionary to a definition of the particular database.

On the other hand, pooled tables and cluster tables are not created in the database. The data of these tables is stored in the corresponding table pool or table cluster. It is not necessary to create indexes and technical settings for pooled and cluster tables.

Pooled table

Pooled tables can be used to store control data (e.g. screen sequences, program parameters or temporary data). Several pooled tables can be combined to form a table pool. The table pool corresponds to a physical table on the database in which all the records of the allocated pooled tables are stored.

Cluster table

Cluster tables contain continuous text, for example, documentation. Several cluster tables can be combined to form a table cluster. Several logical lines of different tables are combined to form a physical record in this table type. This permits object-by-object storage or object-by-object access. In order to combine tables in clusters, at least parts of the keys must agree. Several cluster tables are stored in one corresponding table on the database.

more info

http://help.sap.com/saphelp_erp2004/helpdata/en/81/415d363640933fe10000009b38f839/frameset.htm

http://cma.zdnet.com/book/abap/ch03/ch03.htm

Check this links.

http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm

http://www.techinterviews.com/?p=198

Regds,

naveen