Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

About Out-Joins

Former Member
0 Kudos

Hello Friends,

Please send me an example to create on multiple table outer joins. Please send me ASAP.

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Here is a sample of the syntax.



data: imarc type table of marc with header line.


select * up to 100 rows into corresponding fields of table imarc
        from mara
              left outer join marc
                 on mara~matnr = marc~matnr
                         where mara~mtart = 'HALB'.

Regards,

Rich Heilman

4 REPLIES 4

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Here is a sample of the syntax.



data: imarc type table of marc with header line.


select * up to 100 rows into corresponding fields of table imarc
        from mara
              left outer join marc
                 on mara~matnr = marc~matnr
                         where mara~mtart = 'HALB'.

Regards,

Rich Heilman

Former Member
0 Kudos

I want to the outer joins more than 2 tables. Please help me.

Former Member
0 Kudos

Hi,

Please find below the multiple left outer join queries using 3 tables namely EANL, IFLOT and EASTL.

Data : Begin of lt_outtab occurs 0,

anlage like eanl-anlage,

tplnr like iflot-tplnr,

logiknr like eastl-logiknr,

end of lt_outtab.

parameters p_mprn like iflot-zzmeter_pt_ref.

select b~anlage

a~tplnr

c~logiknr

into table lt_outtab

from iflot as a left outer join eanl as b

on azzinstall_num = banlage

left outer join eastl as c

on azzinstall_num = canlage

where a~zzmeter_pt_ref = p_mprn.

if sy-subrc ne 0.

endif.

Regards,

Jagath.