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: 

retreive data from table pool and table cluster

Former Member
0 Kudos

Hi all

Please let me know the procedure to retreive data from table pool and table cluster.

Thanks

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You can access them using SELECT statements, I believe that you CAN NOT use joins though.

For example, BSEG is a cluster table.

report zrich_0003 .


data: ibseg type table of bseg with header line.


parameters: p_bukrs type bseg-bukrs.

select * into table ibseg from bseg
        up to 100 rows
           where bukrs = p_bukrs.


loop at ibseg.
  write:/ ibseg-bukrs, ibseg-belnr.

endloop.

Regards,

Rich Heilman

5 REPLIES 5

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You can access them using SELECT statements, I believe that you CAN NOT use joins though.

For example, BSEG is a cluster table.

report zrich_0003 .


data: ibseg type table of bseg with header line.


parameters: p_bukrs type bseg-bukrs.

select * into table ibseg from bseg
        up to 100 rows
           where bukrs = p_bukrs.


loop at ibseg.
  write:/ ibseg-bukrs, ibseg-belnr.

endloop.

Regards,

Rich Heilman

0 Kudos

You can use them neither in joins nor views.

Rob

Former Member
0 Kudos

Hi ,

You can use Rich's logic or you can use Import statement also for clusters.

Ex: MDTC is a cluster table.

IMPORT MDTBX FROM DATABASE MDTC(AR) ID IDTNUM.

Lanka

Former Member
0 Kudos

Hi Ravindra,

Normal Selects would work.But only problem is you cannot Join the tables.

Former Member
0 Kudos

Hi Ravindra,

Follow these lines : you may find your problem resolved.

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. <b>You can access cluster tables only via Open SQL, and only without using joins. </b>

Similarly for pool table

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. <b>The only way to access pool tables is by using Open SQL. Joins are not allowed.

</b>

Best Regards

Amit Kumar