‎2009 Mar 18 12:30 PM
hi experts.
SELECT * INTO CORRESPONDING FIELDS OF TABLE it_sym FROM ismp
JOIN ismitop ON ( ismpismnr = ismitopismnr )
JOIN ismitpr ON ( ismpismnr = ismitprismnr )
WHERE ismp~ismnr IN s_sympt.
i am using this select querry but when the ismnr is not mensioned in any of ismitop or ismitpr but is ther e in ismp. the table it_sym is null.
i want full join. how should i write.
plz suggest the code.
with regards
ajay
‎2009 Mar 18 12:40 PM
specify the table name against the fieldsto be picked from
Eg: select ismp~ismnr
ismp~< >
ismp~< >
from ........
‎2009 Mar 18 12:32 PM
‎2009 Mar 18 12:35 PM
but when i used the left join the internal table doesnot have ismnr field value. why it is so ?
‎2009 Mar 18 12:34 PM
Remove INTO CORRESPONDING FIELDS OF it hampers the performance of the table.
Split the select query into two select queries .
SELECT * INTO CORRESPONDING FIELDS OF TABLE it_sym FROM ismp
LEFT OUTER JOIN ismitop ON ( ismpismnr = ismitopismnr )
WHERE ismp~ismnr IN s_sympt.
OR:
SELECT * INTO CORRESPONDING FIELDS OF TABLE it_sym FROM ismp
JOIN ismitop ON ( ismpismnr = ismitopismnr )
WHERE ismp~ismnr IN s_sympt.
THEN
Use:For All entries in IT_SYM For last join JOIN ismitpr ON ( ismpismnr = ismitprismnr )
Regards,
Gurpreet
‎2009 Mar 18 12:39 PM
For All entries in IT_SYM For last join JOIN ismitpr ON ( ismpismnr = ismitprismnr )
creating syntex error.
‎2009 Mar 18 12:51 PM
hi gurpreet
has u told me to write this one.
SELECT * INTO CORRESPONDING FIELDS OF TABLE it_sym FROM ismp
LEFT OUTER JOIN ismitop ON ( ismpismnr = ismitopismnr )
WHERE ismp~ismnr IN s_sympt.
use: For All entries in IT_SYM For last join JOIN ismitpr ON ( ismpismnr = ismitprismnr ).
use is not a valid key word.. it is saying like that.
plz help me.
ajay
‎2009 Mar 18 12:34 PM
‎2009 Mar 18 12:36 PM
Because left join brings the join only when it exists, but preserves the left part even if the right part is absent.
‎2009 Mar 18 12:40 PM
specify the table name against the fieldsto be picked from
Eg: select ismp~ismnr
ismp~< >
ismp~< >
from ........
‎2009 Mar 18 1:49 PM
select ismp~ismnr
ismp~ismtp
ismp~ismart
ismp~objnr
ismp~valdtfrm
ismp~valdtto
ismitop~opgrp
ismitop~opcod
ismitpr~prgrp
ismitpr~prcod
from ( ismp LEFT JOIN ismitop ON ( ismpismnr = ismitopismnr )
LEFT JOIN ismitpr ON ( ismpismnr = ismitprismnr ) )
into corresponding fields of table IT_SYM
WHERE ismp~ismnr IN s_sympt.
even after writing this the record has not been fetched if the data is not mainsioned in any table of corresponding ismnr.
please help..
ajay