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: 

How to write select query for pool and cluster tables

9035358424
Explorer
0 Kudos
1,292

How to write select query for pool and cluster tables ?

5 REPLIES 5

DominikTylczyn
Active Contributor
0 Kudos
787

Hello 9035358424

Just use ABAP Open SQL statements. The application server will take care of accessing both cluster and pool tables.

Best regards

Dominik Tylczynski

0 Kudos
787

Thank you Dominik Tylczynski

Sandra_Rossi
Active Contributor
0 Kudos
787

You may search the forum/SAP Web site with your favorite Web search engine. I see many answers for search below:

How to write select query for pool and cluster tables ? site:sap.com

dustinkredmond
Explorer
0 Kudos
787

You can use standard ABAP OpenSQL. That being said, with Cluster tables, you should also note that these tables cannot be used in a JOIN clause. You must select from them, usually using a FOR ALL ENTRIES statement.

E.g.

SELECT * FROM transparent_table INTO TABLE gt_transparent WHERE <some_where_clause>.

SELECT * FROM cluster_table INTO TABLE gt_cluster
  FOR ALL ENTRIES IN gt_transparent
  WHERE <key_field> EQ gt_transparent-<key_field>.

dustinkredmond
Explorer
0 Kudos
787

You can use standard ABAP OpenSQL. That being said, with Cluster tables, you should also note that these tables cannot be used in a JOIN clause. You must select from them, usually using a FOR ALL ENTRIES statement.

E.g.

SELECT * FROM transparent_table INTO TABLE gt_transparent WHERE <some_where_clause>.

SELECT * FROM cluster_table INTO TABLE gt_cluster
  FOR ALL ENTRIES IN gt_transparent
  WHERE <key_field> EQ gt_transparent-<key_field>.