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

Inner Join

Former Member
0 Likes
463

Hi,

I have the inner join between VIQMEL and VIQMFE tables as below.

SELECT a~qmart

a~qmnum

a~qmtxt

a~qmdat

a~qmdab

a~tplnr

a~vkorg

a~objnr

a~mawerk

a~lifnum

a~matnr

a~coaufnr

a~zzposid

FROM viqmel AS a INNER JOIN viqmfe AS b

ON aqmnum = bqmnum

INTO TABLE i_viqmel

WHERE a~qmart IN r_qmart AND

a~qmart IN ('QE','QI','V2','V3','V4','V5','WG','ZG','ZS','ZW') AND

a~qmnum IN r_qmnum AND

a~tplnr IN r_tplnr AND

a~vkorg IN r_vkorg AND

a~mawerk IN r_mawerk AND

b~otgrp IN r_otgrp AND

b~oteil IN r_oteil AND

a~lifnum IN r_lifnum AND

a~matnr IN r_matnr AND

a~coaufnr IN r_coaufnr AND

a~zzposid IN r_zzposid.

Here for some Notification numbers i am not getting the records as the number is not maintained in VIQMFE table but the entry exists in VIQMEL table. But i need to get the record even it is not in VIQMFE table. Can anyone let me know how to change the above statement to get the records. Is the join used correct or need to write any other join for these kind of situations.

Regards,

Ramesh

2 REPLIES 2
Read only

Former Member
0 Likes
390

Have a look at the help for LEFT OUTER JOIN.

Read only

h_senden2
Active Contributor
0 Likes
390

For a inner join the record must exist in both tables.

For your requirement you will need an outer join or LEFT JOIN (instead of INNER JOIN) in abap code

regards,

Hans

Please reward all helpful answers !!!!!