‎2010 May 03 9:39 AM
Hi All,
Does Open SQL supports right outer join?
I have searched on help.sap.com but did not found any reference for the same.
If not, any idea why is this not supported?
Thanks,
Piyush
‎2010 May 03 10:28 AM
Hi Piyush,
The obvious starting point for such investigations is the online ABAP help, because it's fast and easy - you know already the keyword (SELECT), so just do a F1 in the ABAP editor and check out what it says.
Anyhow, you'll find the online ABAP help also on the web, check out the [SELECT - join|http://help.sap.com/abapdocu_70/en/ABAPSELECT_JOIN.htm] link, where it is explained that open SQL supports outer joins (though you cannot use multiple outer joins).
Cheers, harald
‎2010 May 03 10:28 AM
Hi Piyush,
The obvious starting point for such investigations is the online ABAP help, because it's fast and easy - you know already the keyword (SELECT), so just do a F1 in the ABAP editor and check out what it says.
Anyhow, you'll find the online ABAP help also on the web, check out the [SELECT - join|http://help.sap.com/abapdocu_70/en/ABAPSELECT_JOIN.htm] link, where it is explained that open SQL supports outer joins (though you cannot use multiple outer joins).
Cheers, harald
‎2010 May 03 10:37 AM
Hi Harald,
The OP wants to know why RIGHT OUTER JOIN is not supported in Open SQL. I assume the OP knows about the LEFT OUTER JOIN statement.
I think the RIGHT OUTER JOIN is same as the LEFT OUTER JOIN with the RHS & LHS tables interchanged. Please correct me if i am wrong.
BR,
Suhas
‎2010 May 03 10:59 AM
Hi Suhas / Harald,
Yes, LEFT OUTER JOIN is already supported and we are using this in our application as well.
From SQL perspective it's tables interchanged, but constraint comes when the same table has to participate in more than one join - as if it has already participated on right side of the join.
What i wanted to know was support for RIGHT OUTER JOIN in open SQL , as in the docu help also they mentioned only LEFT OUTER JOINS.
Thanks,
Piyush
‎2010 May 03 11:19 AM
I don't think that RIGHT OUTER JOIN is available in Open SQL. Anyways i don't get this point:
but constraint comes when the same table has to participate in more than one join - as if it has already participated on right side of the join.
Can you explain in detail ?
BR,
Suhas
‎2010 May 03 11:20 AM
Ah, my bad - missed the right part...
Though I don't really see any difference between the left and right outer join, because you should always be able to rearrange your sequence of the select (based on the unchangeable priority of the joins you might be forced to define a dictionary view in some cases). The part that is in my opinion the real restriction is that you can only have one outer join and that open SQL doesn't allow you to define any conditions on the outer join table (e.g. like the simple scenario where you want to use an outer join to find table entries in one table that don't have a corresponding entry in another table).
Anyhow, it's late on my side and maybe I should be more careful with my postings. Hope I didn't blabber.
‎2010 May 03 10:30 AM
Hi Piyush
check this link..http://help.sap.com/erp2005_ehp_04/helpdata/EN/66/f9545ed3654bd4b55bf7a5b9953a53/frameset.htm
best regards.
Marco
‎2010 May 03 10:53 AM
Hi Piyush,
RIGHT OUTER JOIN is one of the JOIN operations that allow you to specify a JOIN clause. It preserves the unmatched rows from the second (right) table, joining them with a NULL in the shape of the first (left) table. A LEFT OUTER JOIN B is equivalent to B RIGHT OUTER JOIN A, with the columns in a different order.
Regards
Karthick.