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: 

please help - error: JOIN IS NOT ALLOWED

Former Member
0 Kudos

hello guyz,

im new to ABAP and i try query REGUP table using this code:

i try to run this code but it always prompt, FOR POOLED TABLES, CLUSTER TABLES, AND PROJECTION VIEWS, JOIN IS NOT ALLOWED: "REGUP"

IF SY-SUBRC EQ 0.

READ TABLE I_EDID4 INDEX 1.

SELECT SINGLE itab-MGSTYP "insert msgtyp

A~BUKRS "Company Code

A~LIFNR "Vendor

B~XEDIP "Registered or Not

INTO (I_COUNT-BSART, I_COUNT-BUKRS, I_COUNT-LIFNR, I_COUNT-XEDIP)

FROM REGUP as A

INNER JOIN LFB1 as B

ON ALIFNR EQ BLIFNR

WHERE A~VBLNR = I_EDID4-SDATA+21(10).

I_COUNT-DOCNUM = ITAB-DOCNUM.

APPEND I_COUNT.

ENDIF.

what is the best alternative way for this?

THanks in advance!

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

The best possible way is to select the desired data from tables

into the internal table respectively and then read internal tables as per your requirement.

eg : select * from mara into itab1 where cond(if applicable)

select * from makt into itab2 where cond(if applicable)

loop at itab1.

l_tabix sy-tabix.

read table itab2 with key matnr = itab1-matnr.

modify itab1 index l_tabix transporting maktx.

endloop.

Thanks & Regards

Ruchi Tiwari

3 REPLIES 3

former_member188685
Active Contributor
0 Kudos

from the message it is very clear that it is not possible to use joins, so use separate selects and use for all entries for second select using the first selected data. read the help on selecting the data using various ways from database.

Former Member
0 Kudos

Hi,

The best possible way is to select the desired data from tables

into the internal table respectively and then read internal tables as per your requirement.

eg : select * from mara into itab1 where cond(if applicable)

select * from makt into itab2 where cond(if applicable)

loop at itab1.

l_tabix sy-tabix.

read table itab2 with key matnr = itab1-matnr.

modify itab1 index l_tabix transporting maktx.

endloop.

Thanks & Regards

Ruchi Tiwari

Former Member
0 Kudos

there are three types of Database Tables.

1. Transperant Table

2. cluster table

3. pooled table

INNER JOIN in select query is allowed only in case of transperant table.

As REGUP is a Cluster Table, you cannot write INNER JOIN with this table