cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Query - Need to join 3 Tables via outer join

former_member524427
Participant
0 Kudos

Hi,

I need to join 3 Tables using SAP Query. I wish an OUTER JOIN to be performed for the table join.

For Example:

Table 1 has 1000 Entries Field A Field B

Table 2 has 300 Entries Field A Field C

Table 3 has 100 Entries Field A Field D

The normal Join (INNER JOIN) gives me only the records that exists in all the 3 Tables.

But what i need is:

In the above example, If one entry in Table 1 has no matching records in Table 2 / Table 3, there should be an output entry in the SAP Query like

Field A Field B Field C Field D

xxxx yyyy Blank Blank

If there is a common record that exists in the tables, that record should appear in the same entry in the Query output.

Field A Field B Field C Field D

xxxx yyyy zzzz aaaa

In this way, there should be a minimum of 1000 entries (Largest no of records in the Tables joined). More than 1000 records in the Query output depends on the number of common records.

Kindly help if you have come across such a scenario.

thanks & regds

sriram

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Please join the outer join as below

Table1 with Field A to Table 2 Field A-----outer join

Table1 with Field A to Table 3 Field A------outer join

then you get the out put as per your requirement

Regards

Damu

Answers (0)