‎2007 Apr 27 5:29 PM
hi
plz rectify the error,
there is some prob with my inner join select stmt which i am unable to identify
here is the code.
tables: lfa1, ekko,
select-options: vend for lfa1-lifnr.
data: begin of itab occurs 0,
lifnr like lfa1-lifnr,
name1 like lfa1-name1,
land1 like lfa1-land1,
ebeln like ekko-ebeln,
end of itab.
select lfa1lifnr lfa1name1 lfa1land1 ekkoebeln into table itab from lfa1 inner join ekko on lfa1lifnr = ekkoebeln where lfa1~lifnr in vend.
loop at itab.
write: itab.
endloop.
‎2007 Apr 27 5:32 PM
Hi!
Try like this:
select lfa1~lifnr lfa1~name1 lfa1~land1 ekko~ebeln
into table itab
from lfa1 inner join ekko on lfa1~lifnr = ekko~lifnr "ekko~lifnr
where lfa1~lifnr in vend.
Regards
Tamá
‎2007 Apr 27 5:36 PM
hi tamas,
thanx for the response.
actually it was type mistake , i am having prob with the one which had provided
‎2007 Apr 27 5:33 PM
Hi,
you need match lifnr in your select query not PO number (lfa1lifnr = ekkolifnr ), it should be like this
tables: lfa1, ekko,
select-options: vend for lfa1-lifnr.
data: begin of itab occurs 0,
lifnr like lfa1-lifnr,
name1 like lfa1-name1,
land1 like lfa1-land1,
ebeln like ekko-ebeln,
end of itab.
select lfa1lifnr lfa1name1 lfa1land1 ekkoebeln into table itab from lfa1 inner join ekko on lfa1lifnr = ekkolifnr where lfa1~lifnr in vend.
loop at itab.
write: itab.
endloop.
Regards
MM
‎2007 Apr 27 6:39 PM
Hi
Whenever you are writing the select query on joins are tables first note down that
fields order in the select query must match with the Internal table fields declarations otherwise simply use the <b>corresponding fields of table</b> in your query.
Your query is going wrong because of these reason only.
Regards,
Sreeram