‎2007 Apr 23 8:45 AM
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
‎2007 Apr 23 8:50 AM
‎2007 Apr 23 8:52 AM
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 !!!!!