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: 

JOIN ON CLUSTER TABLE

Former Member
0 Kudos

Can we use cluster table BSEG in Inner Join with table BKPF?

It is gives an error when I am trying to join.

The error is 'cannot use join on cluster or pool table'.

3 REPLIES 3

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

This is taken from F1 help of inner join.

Effect

Selects data from the transparent database tables or views specified in tabref1 and tabref2. tabref1 and tabref2 either have the same form as in variant 1 or are themseleves joine expressions. The key word INNER can be omitted. The database tables or views specified in tabref1 and tabref2 must be recognized in the ABAP-Dictionary.

In a relational data structure, it is quite normal for data that belongs together to be split up across several tables to help standardization (see relational database). To regroup this information in a database query, you can link tables using a join command. This formulates conditions for the columns of the tables involved. An inner join contains all combinations of lines from database table tabref1 with lines from database table tabref2 that meet the condition specified in the logical condition ON cond.

For outer join:

... FROM tabref1 LEFT [OUTER] JOIN tabref2 ON cond

Effect

Selects data from the transparent database tables or views specified in tabref1 and tabref2. tabref1 and tabref2 either have the same form as in variant 1 or are themseleves joine expressions. The key word OUTER can be omitted. The database tables or views specified in tabref1 and tabref2 must be recognized in the ABAP Dictionary and declared in the program with an appropriate TABLES statement.

In order to determine the result of a SELECT statement where the FROM clause contains a left outer join, the database system creates a temporary table containing the lines that meet the ON condition. The remaining fields from the left hand table (tabref1) are then added to this table, and their corresponding fields from the right hand table are filled with NULL values. The system then applies the WHERE condition to the table

Former Member
0 Kudos

No, as the system says : You cannot join cluster table like BSEG .

0 Kudos

I suggest you to do a selection from BKPF ( into table t_bkpf ) and then do the second selection on BSEG using "for all entries in t_bkpf" .

Hope this helps.

Erwan.