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: 

Inner Join

Former Member
0 Kudos
107

Hi,

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.

1 REPLY 1

Former Member
0 Kudos
46

Hi,

Check this below link

http://www.sap-img.com/abap/inner-joins.htm

Hope this helps.

Regards,

Anki Reddy