Application Development and Automation 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: 
Read only

Join a cluster table + transparent table

Former Member
0 Likes
502

Hi,

can you give me an example to join between a cluster table + transparent table.

Best regards.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
447

Cluster tables cannot be used in an ABAP join. For this reason, you have to select the key from the transparent table first and then select the cluster table with 'for all entries' syntax.

You may also check if a logical database is available by se36.

2 REPLIES 2
Read only

former_member386202
Active Contributor
0 Likes
447

Hi,

Join doesnt work on cluster table use FOR ALL ENTRIES for that

refer below code

SELECT bukrs

zuonr

gjahr

belnr

budat

bldat

blart

shkzg

dmbtr

xref3

FROM bsis

INTO CORRESPONDING FIELDS OF TABLE it_bsis

WHERE bukrs EQ p_bukrs

AND hkont EQ p_hkont

AND blart IN s_blart

AND budat IN s_budat.

IF NOT it_bsis[] IS INITIAL.

SELECT belnr

gjahr

awkey

FROM bkpf

INTO TABLE it_bkpf

FOR ALL ENTRIES IN it_bsis

WHERE bukrs EQ it_bsis-bukrs

AND belnr EQ it_bsis-belnr

AND gjahr EQ it_bsis-gjahr.

IF sy-subrc EQ 0.

SORT it_bkpf BY belnr gjahr.

ENDIF.

ENDIF.

Regards,

Prashant

Read only

Former Member
0 Likes
448

Cluster tables cannot be used in an ABAP join. For this reason, you have to select the key from the transparent table first and then select the cluster table with 'for all entries' syntax.

You may also check if a logical database is available by se36.