‎2008 Jun 23 6:22 AM
Hi experts,
i m using outer join on 4 tables. while debugging i m getting 39 entries when using joins on 3 tables, but when i use 4 th table entries increases to 42. It should not b increaseas i want entry from fourth table for corresponding fields of 3 tables.
Plz correct me where i m wrong
select abanfn aekgrp aafnam atxz01 amatnr awerks algort abednr
amenge ameins abadat afrgdt aebeln aebelp
bbelnr bbwart b~budat
c~preis
d~udate
from ( eban as a left outer join ekbe
as b on
awerks eq bwerks and
aebeln eq bebeln and
aebelp eq bebelp
left join eipa as c on
cebeln = aebeln and
cebelp = aebelp and
cwerks = awerks
left join cdhdr as d on
dobjectid = aebeln and
d~tcode ='ME29N' )
into corresponding fields of
table eban_ekbe
where a~ekgrp in s_ekgrp and
a~afnam in s_afnam and
a~matnr in s_matnr and
a~werks eq p_werks and
a~lgort in s_lgort and
a~badat in s_badat .
Savita
‎2008 Jun 23 6:49 AM
Hi Savita,
Instead of doing the Outer join Why dont you use FOR ALL ENTRIES IN <TAB>.
This will defiantly resolve your problem
&***********Reward Point if helpful*************&
‎2008 Jun 23 6:50 AM
Hi ,
You have not used the proper join conditions.Try to use keay fileds to join table if possible in your case. Other wise split your join to get the required data so that you will get the appropriate data.
‎2008 Jun 23 6:59 AM
Hi Savita,
Try Using FOR ALL ENTRIES and use all of your key fields to get the data. This must help you.
Regards,
Sai