05-12-2009 11:45 AM
Hi,
I have to get DMBTR value from BSEG table and BELNR value from BKPF table,
So i applied join for these two table but I am getting one error message
" for pooled tables, cluster tables and projection views , join is not allowed' BSEG' "
why i am not able to join these two table(BSEG & BKPF) even though I am having common field BELNR
How to resolve this issue. Please help me
my code is :-
select a~BELNR
b~DMBTR
from BKPF as a join BSEG as b on aBELNR = bBELNR
APPENDING CORRESPONDING FIELDS OF TABLE itab.
05-12-2009 11:57 AM
BELNR is also in the key of BSEG, so why do you need BKPF at all? Also, you probably want to include at least BUKRS in the WHERE-conditions.
Thomas
05-12-2009 11:52 AM
Hi
Because in the database the ways to arrange a transparent table and cluster/pool table are different, for example BSEG table is based on cluster RFBLG.
When u do a select on BSEG, really the system uses RFBLG.
Max
05-12-2009 11:57 AM
BELNR is also in the key of BSEG, so why do you need BKPF at all? Also, you probably want to include at least BUKRS in the WHERE-conditions.
Thomas
05-12-2009 12:13 PM
Use for all entries.
SELECT * FROM BKPF INTO table GTAB WHERE BUKRS = SO_BUKRS.
SELECT * FROM BSEG INTO TABLE ITAB FOR ALL ENTRIES IN GTAB WHERE BELNR = GTAB-BELNR.(instead of selecting all values u can select whatever u want)
GTAB is table of type BKPF WITH HEADER LINE.
ITAB IS TABLE OF TYPE BSEG WITH HEADER LINE
05-12-2009 12:43 PM
Hi,
BSEG is a cluster table and join is not possible with any cluster table. All you have to do is to declare internal tables like the following
DATA: BEGIN OF BKPF_INT OCCURS 0.
INCLUDE STRUCTURE BKPF.
DATA: END OF BKPF_INT.
DATA: BEGIN OF bseg_int OCCURS 0.
INCLUDE STRUCTURE bseg.
DATA: END OF bseg_int.
SELECT * FROM bkpf
INTO TABLE BKPF_INT
WHERE bukrs = 'your company code'.
SELECT * FROM bseg
INTO TABLE bseg_int
FOR ALL ENTRIES IN BKPF_INT
WHERE matnr = wa_plantmat-matnr
AND bukrs = BKPF_INT-bukrs
AND belnr = BKPF_INT-belnr.
Hopefully this will solve your problem.
Regards,
Ibrar
08-14-2020 10:20 AM
Please, check if this link below can help you.
SE16N - Error - JOIN is not allowed for polled tables, cluster tables and Projection Views
KR.
Adriano