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: 

pool and cluster tables

Former Member
0 Kudos
499

Hi All,

can any one explain

1) what is the main difference between

pool and cluster tables???

2) in realtime can we create the pool and cluster tables???

if yes .. in which Situation???

plz.. explain..

regards,

8 REPLIES 8

Former Member
0 Kudos
299

hi,

<u>Pooled Table:</u>

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.

<u>

Cluster Table:</u>

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.

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.

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.

Regards

Reshma

0 Kudos
299

Hi RESHMA,

In Realtime can we create the pool and cluster tables???

if yes .. in which Situation???

plz.. explain..

regards,

vijay.

0 Kudos
299

hi,

Yes, In real time, we are using pool and cluster tables.

for eg: the pay roll tables. PCLX ..they are cluster tables.

Regards

Reshma

0 Kudos
299

Hi Reshma,

thanks for your valuble information.

can u give one example of POOLED TABLE.

Regards,

vijay.

former_member196299
Active Contributor
0 Kudos
299

Hi Vijay,

A pool table has many to one relation with the table in the database. For one table in the database there are many tables in the dictionary. Tha table in the database has a diff name than in the table in the data dict, it has diff no of fields and field names are different. A pooled table is stored in the pool at the database level. A table pool is a databse table with a special struct that enables the data of many R3 tables to be stored in it. It can hold only pooled tables

Cluster table are logical tables that must be assigned to a table cluster when they are defined.

Cluster table can be used to store control data they can also used to store temporary data or text such as documentation

Pool table

A database table defined in the ABAP Dictionary whose database instance is assigned to more than one table defined in the ABAP Dictionary. Multiple pool tables are assigned to a table pool in the database. The key fields of a pool table have to be character-type fields. The table pool's primary key consists of two fields: TABNAME for the name of a pool table, and VARKEY for the interdependent contents of the key fields in the corresponding pool table. The non-key fields of the pool table are stored in compressed format in their own column, called VARDATA, of the table pool. The only way to access pool tables is by using Open SQL. Joins are not allowed.

Table Pool

Database table in the database that contains the data of several pool tables.

Cluster Table

Database table defined in the ABAP Dictionary, whose version on the database is not only assigned to one table defined in the ABAP Dictionary. Several cluster tables are assigned to a table cluster in the database. The intersection of the key fields of the cluster tables forms the primary key of the table cluster. The other columns of the cluster tables are stored in compressed form in a single column VARDATA of the table cluster. You can access cluster tables only via Open SQL, and only without using joins.

Table Cluster

Database table in the database that contains the data of several cluster tables.

Note: Never mix up with a database table that has the necessary structure for storing data clusters in database tables and in the shared memory. Those are called INDX-type, with reference to the database table INDX supplied by SAP. Data clusters are groupings of data objects for transient and persistent storage in a selectable storage medium. A data cluster can be processed using the statements IMPORT, EXPORT, and DELETE FROM

Reward if helpful ,

Thanks

Ranjita

Former Member
0 Kudos
299

Hi Vijay,

Pool table

A database table defined in the ABAP Dictionary whose database instance is assigned to more than one table defined in the ABAP Dictionary. Multiple pool tables are assigned to a table pool in the database. The key fields of a pool table have to be character-type fields. The table pool's primary key consists of two fields: TABNAME for the name of a pool table, and VARKEY for the interdependent contents of the key fields in the corresponding pool table. The non-key fields of the pool table are stored in compressed format in their own column, called VARDATA, of the table pool. The only way to access pool tables is by using Open SQL. Joins are not allowed.

Table Pool

Database table in the database that contains the data of several pool tables.

Cluster Table

Database table defined in the ABAP Dictionary, whose version on the database is not only assigned to one table defined in the ABAP Dictionary. Several cluster tables are assigned to a table cluster in the database.

2. If it is large amount data we have to fetch from database then go for the pooled and cluster tables.

Some pooled tables:

T000 Clients

T000C Table for Installing FI-SL Customizing

T000CM Client-specific FI-AR-CR settings

T000F Cross-Client FI Settings

T000G Cross-Client FI-SL Postings

T000GL Flexible general ledger: Customizing check

T000K Group

T000MD MRP at MRP Area Level

T001 Company Codes

T001_ARCH Archive contents short description

T001_CONV Company codes affected by currency convers

T001A Additional Local Currencies Control for Co

T001B Permitted Posting Periods

T001C Valid Posting Periods for Global Companies

T001CM Permitted Credit Control Areas per Company

T001D Validation of Accounting Documents

T001E Company Code-Dependent Address Data

T001F Company code-dependent form selection

T001G Company Code-Dependent Standard Texts

T001I Company Code - Parameter Types

T001J Company Code - Parameter Type Names

T001K Valuation area

T001L Storage Locations

T001M Data on Z5A Foreign Trade Regulations Repo

T001N Company Code - EC Tax Numbers / Notificati

**********Rewards some points.

Rgds,

P.Naganjana Reddy

Former Member
0 Kudos
299

Hi,

Pooled and Cluster Tables

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:

Field

Data type

Meaning

Tabname

CHAR(10)

Name of pooled table

Varkey

CHAR (n)

Contains the entries from all key fields of the pooled table record as a string, max. length for n is 110

Dataln

INT2(5)

Length of the string in Vardata

Vardata

RAW (n)

Contains the entries from all data fields of the pooled table record as a string, max. length n depends on the database system used

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.

Due to the structure of a table pool, there are certain restrictions on the pooled tables assigned to it. The name of a pooled table may not exceed 10 characters. Since Varkey is a character field, all key fields of a pooled table must have character data types (for example, CHAR, NUMC, CLNT). The total length of all key fields or all data fields of a pooled table must not exceed the length of the Varkey or Vardata field of the assigned pool.

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. A table cluster has the following structure:

Field

Data type

Meaning

CLKEY1

*

First key field

CLKEY2

*

Second key field

...

...

...

CLKEYn

*

nth key field

Pageno

INT2(5)

Number of the continuation record

Timestamp

CHAR(14)

Time stamps

Pagelg

INT2(5)

Length of the string in Vardata

Vardata

RAW (n)

Contains the entries from the data fields of the assigned cluster tables as a string, max. length n depends on the database system used

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.

Pl.refer this link.

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

Reward if useful.

Thanks,

USR