Skip to Content
Former Member
Jan 29, 2009 at 05:20 AM

Inner Join



Can i write my select query like below.In this query ,i have joined ekko,ekpo and eket with ebeln but for lfa1 table i have used lifnr,is it the correct way or can i write in some othe way also?

select aebeln bebelp a~ekorg

dname1 dlifnr a~ekgrp

bMATNR bidnlf b~txz01

blabnr bmenge b~meins

ceindt cslfdt c~bedat

into corresponding fields of table gitab

from ( ( ( ekko as a inner join ekpo as b

on aebeln = bebeln ) inner join eket as c

on bebeln = cebeln ) inner join lfa1 as d

on alifnr = dlifnr )

where b~elikz <> 'X'

and b~loekz <> 'X'

and a~ekorg in s_ekorg

and a~ekgrp in s_ekgrp

and d~lifnr in s_lifnr

and b~werks in s_werks

and b~matnr in s_matnr

and c~eindt in s_eindt

and c~slfdt in s_slfdt

and c~bedat in s_bedat.