Application Development and Automation 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: 
Read only

Join

Former Member
0 Likes
543

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

3 REPLIES 3
Read only

Former Member
0 Likes
455

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*************&

Read only

Former Member
0 Likes
455

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.

Read only

Former Member
0 Likes
455

Hi Savita,

Try Using FOR ALL ENTRIES and use all of your key fields to get the data. This must help you.

Regards,

Sai