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

Questions

Former Member
0 Likes
440

Question Experts!!

Im using abap query. and im joining 5 tables namely LFA1 , ADR2 , ADR3 AND ADR6. my link is like this:

lfb1-lifnr <----


lfa1-lifnr

lfa1-adrnr <------ adr2-addrnumber

lfa1-adrnr <------ adr3-addrnumber

lfa1-adrnr <------adr6-addrnumber

problem is when I display my data in queries(sq01)

the data repeatedly displaying 4 times...

I dont know how to fix it.Please help.

Question Experts!!

Im using abap query. and im joining 5 tables namely LFA1 , ADR2 , ADR3 AND ADR6. my link is like this:

lfb1-lifnr <----


lfa1-lifnr

lfa1-adrnr <------ adr2-addrnumber

lfa1-adrnr <------ adr3-addrnumber

lfa1-adrnr <------adr6-addrnumber

problem is when I display my data in queries(sq01)

the data repeatedly displaying 4 times...

I dont know how to fix it.Please help.

1 REPLY 1
Read only

Former Member
0 Likes
391

u should not use join on more than 3 tables, performance will go down.

do join operation on first three table, LFA1, LFB1 & ADR2 into another IT gt_lf_add.

next

check gt_lf_add is not initial.

select req. fields

from ADR3

into table gt_addr3

for all entries in gt_lf_add

where ADDRNUMBER = gt_lf_add-addrnumber

and PERSNUMBER = gt_lf_add-PERSNUMBER

and DATE_FROM = gt_lf_add-PERSNUMBER

and CONSNUMBER = gt_lf_add-PERSNUMBER.

check gt_addr3 is not initial.

do selection on ADR6, based on gt_addr3.

select req. fields

from ADR6

into table gt_addr6

for all entries in gt_addr3

where ADDRNUMBER = gt_addr3-addrnumber

and PERSNUMBER = gt_addr3-PERSNUMBER

and DATE_FROM = gt_addr3-PERSNUMBER

and CONSNUMBER = gt_addr3-PERSNUMBER.

based on these 3 tables , prepare final internal table.