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: 

tables

Former Member
0 Kudos

hi

what are pool and cluster tables?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

Table pools (pools) and table clusters (clusters) are special table types in the ABAP Dictionary. The data from several different tables can be stored together in a table pool or table cluster. Tables assigned to a table pool or table cluster are referred to as pooled tables or cluster tables.

A table pool or table cluster should be used exclusively for storing internal control information (screen sequences, program parameters, temporary data, continuous texts such as documentation). Data of commercial relevance is usually stored in transparent tables.

Table Pools

A table in the database in which all records from the pooled tables assigned to the table pool are stored corresponds to a table pool.

The definition of a pool consists essentially of two key fields (Tabname and Varkey) and a long argument field (Vardata). A pool has the following structure:

If a pooled table record is saved, it is stored in the table pool assigned. The name of the pooled table is written to the field Tabname. The contents of all key fields of the pooled table are written as a string to field Varkey and the contents of all data fields as a string to field Vardata. The length of the string stored in Vardata is entered in field Dataln by the database interface.

Table Clusters

Several logical data records from different cluster tables can be stored together in one physical record in a table cluster.

A cluster key consists of a series of freely definable key fields and a field (Pageno) for distinguishing continuation records. A cluster also contains a long field (Vardata) that contains the contents of the data fields of the cluster tables for this key. If the data does not fit into the long field, continuation records are created. Control information on the structure of the data string is still written at the beginning of the Vardata field.

The records of all cluster tables with the same key are stored under one key in the assigned table cluster. The values of the key fields are stored in the corresponding key fields of the table cluster. The values of all data fields of the assigned cluster tables are written as a string to the Vardata field of the table cluster. Besides the actual data values, the data string contains information on the structure of the data and which table it comes from. If the string exceeds the maximum length of the Vardata field, a continuation record is written with the same key values. The continuation records for a key are distinguished by their value in field Pageno. The actual length of the string in the Vardata field is stored in the Pagelg field by the database interface.

You need the structural information stored in the ABAP Dictionary to read the data from a pooled table or cluster table correctly. These tables can therefore only be processed using Open SQL with the cluster interface, and not with Native SQL directly in the database.

<b>

pls reward if helpful.</b>

5 REPLIES 5

abdulazeez12
Active Contributor
0 Kudos

pooled tables:

A pooled table in R/3 has a many-to-one relationship with a table in the database (see Figures 3.1 and 3.2). For one table in the database, there are many tables in the R/3 Data Dictionary. The table in the database has a different name than the tables in the DDIC, it has a different number of fields, and the fields have different names as well. Pooled tables are an SAP proprietary construct.

cluster tables:

A cluster table is similar to a pooled table. It has a many-to-one relationship with a table in the database. Many cluster tables are stored in a single table in the database called a table cluster.

Former Member
0 Kudos

hi,

Table pools (pools) and table clusters (clusters) are special table types in the ABAP Dictionary. The data from several different tables can be stored together in a table pool or table cluster. Tables assigned to a table pool or table cluster are referred to as pooled tables or cluster tables.

A table pool or table cluster should be used exclusively for storing internal control information (screen sequences, program parameters, temporary data, continuous texts such as documentation). Data of commercial relevance is usually stored in transparent tables.

Table Pools

A table in the database in which all records from the pooled tables assigned to the table pool are stored corresponds to a table pool.

The definition of a pool consists essentially of two key fields (Tabname and Varkey) and a long argument field (Vardata). A pool has the following structure:

If a pooled table record is saved, it is stored in the table pool assigned. The name of the pooled table is written to the field Tabname. The contents of all key fields of the pooled table are written as a string to field Varkey and the contents of all data fields as a string to field Vardata. The length of the string stored in Vardata is entered in field Dataln by the database interface.

Table Clusters

Several logical data records from different cluster tables can be stored together in one physical record in a table cluster.

A cluster key consists of a series of freely definable key fields and a field (Pageno) for distinguishing continuation records. A cluster also contains a long field (Vardata) that contains the contents of the data fields of the cluster tables for this key. If the data does not fit into the long field, continuation records are created. Control information on the structure of the data string is still written at the beginning of the Vardata field.

The records of all cluster tables with the same key are stored under one key in the assigned table cluster. The values of the key fields are stored in the corresponding key fields of the table cluster. The values of all data fields of the assigned cluster tables are written as a string to the Vardata field of the table cluster. Besides the actual data values, the data string contains information on the structure of the data and which table it comes from. If the string exceeds the maximum length of the Vardata field, a continuation record is written with the same key values. The continuation records for a key are distinguished by their value in field Pageno. The actual length of the string in the Vardata field is stored in the Pagelg field by the database interface.

You need the structural information stored in the ABAP Dictionary to read the data from a pooled table or cluster table correctly. These tables can therefore only be processed using Open SQL with the cluster interface, and not with Native SQL directly in the database.

<b>

pls reward if helpful.</b>

Former Member
0 Kudos

Hi,

A pooled table in R/3 has a many-to-one relationship with a table in the database . For one table in the database, there are many tables in the R/3 Data Dictionary. The table in the database has a different name than the tables in the DDIC, it has a different number of fields, and the fields have different names as well. Pooled tables are an SAP proprietary construct.

A cluster table is similar to a pooled table. It has a many-to-one relationship with a table in the database. Many cluster tables are stored in a single table in the database called a table cluster.

rgds,

bharat.

Former Member
0 Kudos

Hi,

Table pools (pools) and table clusters (clusters) are special table types in the ABAP Dictionary. The data from several different tables can be stored together in a table pool or table cluster. Tables assigned to a table pool or table cluster are referred to as pooled tables or cluster tables.

A table pool or table cluster should be used exclusively for storing internal control information (screen sequences, program parameters, temporary data, continuous texts such as documentation). Data of commercial relevance is usually stored in transparent tables.

I. Transparent tables (BKPF, VBAK, VBAP, KNA1, COEP)

· Allows secondary indexes (SE11->Display Table->Indexes)

· Can be buffered (SE11->Display Table->technical settings) Heavily updated tables should not be buffered.

II. Pool Tables (match codes, look up tables)

· Should be accessed via primary key or

· Should be buffered (SE11->Display Table->technical settings)

· No secondary indexes

· Select * is Ok because all columns retrieved anyway

III. Cluster Tables (BSEG,BSEC)

· Should be accessed via primary key - very fast retrieval otherwise very slow

· No secondary indexes

· Select * is Ok because all columns retrieved anyway. Performing an operation on multiple rows is more efficient than single row operations. Therefore you still want to select into an internal table. If many rows are being selected into the internal table, you might still like to retrieve specific columns to cut down on the memory required.

· Statistical SQL functions (SUM, AVG, MIN, MAX, etc) not supported

· Can not be buffered

IV. Buffered Tables (includes both Transparent & Pool Tables)

While buffering database tables in program memory (SELECT into internal table) is generally a good idea for performance, it is not always necessary. Some tables are already buffered in memory. These are mostly configuration tables. If a table is already buffered, then a select statement against it is very fast. To determine if a table is buffered, choose the 'technical settings' soft button from the data dictionary display of a table (SE12). Pool tables should all be buffered.

"Major difference betwen Standard tables,Pooled tables and Cluster Tables?

1.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.

2.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.

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

4.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.

5.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.

6.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.

7.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.

8.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.

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

10.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.

'The table which store information about Structures and Tables are as follows:

DD02L - table properties

DD02T - table texts

DD03L - field properties

DD03T - field texts

Check the link also,

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21f083446011d189700000e8322d00/content.htm

Thanks,

Reward If Helpful.

Former Member
0 Kudos

Hi

<b>Definitions of Table in Database</b>

In SAP R/3 tables are defined as

A) Transparent tables: All of the fields of a dictionary table correspond to a field in the real database table.

B) Pooled tables: Different tables which are not linked to each other with a common key are combined into a TABLE POOL. Several logical tables thus exist as a single real database table.

C) Cluster tables: Several tables linked by a common key may sometimes be combined by the data dictionary and made to exist on the database schema as a single table.

SAP is evolving R/3 tables in transparent tables.

<b>Elaboration on each of the definitions</b>

<b>A transparent table</b> is automatically created on the database when it is activated in the ABAP Dictionary. At this time the database-independent description of the table in the ABAP Dictionary is translated into the language of the database system used.

The database table has the same name as the table in the ABAP Dictionary. The fields also have the same name in both the database and the ABAP Dictionary. The data types in the ABAP Dictionary are converted to the corresponding data types of the database system.

The order of the fields in the ABAP Dictionary can differ from the order of the fields on the database. This permits you to insert new fields without having to convert the table. When a new field is added, the adjustment is made by changing the database catalog (ALTER TABLE). The new field is added to the database table, whatever the position of the new field in the ABAP Dictionary.

Tables can also reside on the database as Pooled tables or cluster tables

<b>Pooled Tables:</b> Different tables which are not linked to each other with a common key can be combined into a Table Pool. The tables contained within this pool are called Pooled Tables. A table pool is stored in the database a simple table. The table's data sets contain, in separate fields, the actual key for the data set to be stored, the name of the pooled table and the contents of the data set to be stored.

Using this schema, several logical tables are combined into a single real database table. Although the data structure of each set is lost during the write to the table pool, it is restored during the read by the ABAP/4 Data Dictionary. The ABAP/4 Data Dictionary utilizes its meta-data to accomplish this.

Since information must be prepared (defined) within the ABAP/4 Data Dictionary when it is read or written to (or accessed), this process itself defines these as not transparent tables

<b>Cluster Tables</b>: Occasionally, several tables may be linked by a common key. The ABAP/4 Data Dictionary can also combine these tables into a single table. Each data set of the real table within the database contains a key and in a single data field, several data sets of the subsequent table for this key.

As mentioned above, these table types require special data handling, therefore they are not transparent tables.

<b>Reward if usefull</b>