12-05-2007 1:13 PM
Hi. I have such problem
DATA: a_edidd LIKE edidd OCCURS 0 WITH HEADER LINE.
SELECT * FROM edid4
JOIN edidc ON edidc~docnum = edid4~docnum <= ERROR
INTO CORRESPONDING FIELDS OF TABLE a_edidd
WHERE edid4~credat EQ '20071123'.
ERROR:
<i>You cannot use comparisons with column references in pool and clustertables: "EDID4~DOCNUM". </i>
What can I do with it?
12-05-2007 1:31 PM
Hi,
You cannot join transparent table and cluster table..
Instead you can use FOR ALL ENTRIES to get the cluster table data..
Check this example..BKPF is a transparent table and BSEG is a cluster table.
SELECT BELNR GJAHR BUKRS
INTO TABLE T_BKPF
WHERE ERDAT = SY-DATUM.
IF NOT T_BKPF[] IS INITIAL.
SELECT BELNR GJAHR BUKRS BUZEI
FROM BSEG
INTO TABLE T_BSEG
FOR ALL ENTRIES IN T_BKPF
WHERE BELNR = T_BKPF-BELN
AND BUKRS = T_BKPF-BUKRS
AND GJAHR = T_BKPF-GJAHR.
ENDIF.
Regards
12-05-2007 1:14 PM
Can't use "JOIN" statement with pool & cluster table !
<b>EDID4 is a cluster table</b> ( join isn't allowed on this table ) You can see that in SE11.
Use "<b>for all entries"</b> statement instead .
Hope this helps,
Erwan
12-05-2007 1:15 PM
12-05-2007 1:15 PM
hi Piotr,
change:
DATA: a_edidd LIKE edidd OCCURS 0 WITH HEADER LINE.
SELECT * FROM edid4 <b>AS edid4</b>
JOIN edidc <b>AS edidc</b>
ON edidc~docnum = edid4~docnum <= ERROR
INTO CORRESPONDING FIELDS OF TABLE a_edidd
WHERE edid4~credat EQ '20071123'.
ec
UPDATE: edid4 is cluster table so it won't work (but AS is a necessary statemet for joining tables)
12-05-2007 1:16 PM
<b>edid4</b> is a claster table. U can't join with that table. But U may select twice - one from <b>eddic</b>, second - from <b>edid4</b> for all entryes in <b>eddic</b>.
Or find transparent table of that cluster. Sorry for may language...
12-05-2007 1:31 PM
Hi,
You cannot join transparent table and cluster table..
Instead you can use FOR ALL ENTRIES to get the cluster table data..
Check this example..BKPF is a transparent table and BSEG is a cluster table.
SELECT BELNR GJAHR BUKRS
INTO TABLE T_BKPF
WHERE ERDAT = SY-DATUM.
IF NOT T_BKPF[] IS INITIAL.
SELECT BELNR GJAHR BUKRS BUZEI
FROM BSEG
INTO TABLE T_BSEG
FOR ALL ENTRIES IN T_BKPF
WHERE BELNR = T_BKPF-BELN
AND BUKRS = T_BKPF-BUKRS
AND GJAHR = T_BKPF-GJAHR.
ENDIF.
Regards