cancel
Showing results for 
Search instead for 
Did you mean: 

Add Left Outer Join not possible in Infoset Query

Former Member
0 Kudos

Dear fellows,

As the screenshot below indicates, I want to add a Left Outer Join between tables QMEL and QMFE, however, it is not possible due to the following system error: "Illegal left-outer-join chain between tabkes QALS,QMEL and QMFE". Therefore, I end up with an Inner Join between these two tables.


The reason I need to use Left Outer Join, but not Inner Joint, is that an Inner Join on QMNUM fields of both tables does not select the records, in which, the QMNUM of both tables are null.


Now, how can I insert a Left Outer Join between these two tables? Do I need to do it using ABAP code?



Thanks,

Arman




Accepted Solutions (1)

Accepted Solutions (1)

sebastian_lenartowicz
Active Contributor
0 Kudos

Greetings, Arman!

In SAP Query, it is unfortunately not possible to join three tables consecutively with two left joins.

See http://sap.ittoolbox.com/groups/technical-functional/sap-abap/how-to-join-multiple-tables-with-lfet-...

I suggest to see if you can work around this by exploiting table alias to your advantage, e.g. insert an alias of table QMEL as QMEL_, then make a join, like: QALS - lj - QMEL - ij - QMEL_ - lj - QMFE.

This is a technique that I once used to try and circumvent a left join chain, but as I don't know your exact requirement, It's difficult for me to tell if this will provide you with the results that you want.

Apart from that, I can only suggest an ABAP report.

Answers (1)

Answers (1)

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Arman,

The issue of LOJ in sequence is a known issue. Do you know about Alias tables? Using this facility might solve your issue. Example of Use of alias table is explained here.

Good luck

KJogeswaraRao