08-26-2005 12:58 AM
Hi,
I am trying run the following query -
SELECT RSECTAB~MANDT into (RSECTABMANDT)
FROM RSECTAB LEFT OUTER JOIN RSPSP ON RSECTABMANDT = RSPSPMANDT LEFT OUTER JOIN RSADD ON RSPSPMANDT = RSADDMANDT.
I get this -
Error
ABAP Query failed to execute with the following error Unable to compare with "RSPSP~MANDT". A table can be joined with a maximum of one other table using LEFT OUTER JOIN..
What does this error mean?
Thanks,
Sheetal
08-26-2005 3:48 AM
Hi, you can change original code like following:
SELECT RSECTAB~MANDT into (RSECTABMANDT)
FROM <b>RSPSP</b>
LEFT OUTER JOIN <b>RSECTAB</b> ON RSECTABMANDT = RSPSPMANDT
LEFT OUTER JOIN RSADD ON RSPSPMANDT = RSADDMANDT.
the left outer join can only from same table, E.G.
left outer join B to A
left outer join C to A
but can't
left outer join A to B
left outer join B to C
Only the inner join can do like above.
And another point is (RSECTABMANDT), what's it means? a workarea? if it is a workarea, you forget a SINGLE before RSECTAB~MANDT.
Hope it will be helpful
Thanks a lot
08-26-2005 1:08 AM
That you cannot have more than two tables in this select statement with outer join Try with two tables and see if you get this error.
08-26-2005 3:06 AM
You can not join the tables with "mandt" field.mandt field tells about the client number.
you have to use another field (Index or key) in the tables for join.
Yad
08-26-2005 3:09 AM
correction in the above statement:
mandt field is not a client number, but you can not join with that fields.
Thanks,
Yad
08-26-2005 3:48 AM
Hi, you can change original code like following:
SELECT RSECTAB~MANDT into (RSECTABMANDT)
FROM <b>RSPSP</b>
LEFT OUTER JOIN <b>RSECTAB</b> ON RSECTABMANDT = RSPSPMANDT
LEFT OUTER JOIN RSADD ON RSPSPMANDT = RSADDMANDT.
the left outer join can only from same table, E.G.
left outer join B to A
left outer join C to A
but can't
left outer join A to B
left outer join B to C
Only the inner join can do like above.
And another point is (RSECTABMANDT), what's it means? a workarea? if it is a workarea, you forget a SINGLE before RSECTAB~MANDT.
Hope it will be helpful
Thanks a lot