‎2007 Nov 27 1:18 PM
Hi Experts,
I want to inner join two tables.
From Ekpo : matnr, TXZ01.
From Mbew : STPRS
i don't how to do that.
Please send some suggestions on this issue.
Thanks,
Points Assured.
‎2007 Nov 27 1:25 PM
Hi,
Better to use FOR ALL ENTRIES it will be performance wise good
select matnr txzo1
from EKPO
into table it_ekpo
where condition.
if not it_ekpo[] is initial.
select stprs
from mbew
into tbale it_mbew
for all entries in it_ekpo
where matnr eq it_ekpo-matnr.
endif.
Regards,
Prashant
‎2007 Nov 27 1:22 PM
join EKPO MBEW on MATNR and BWTAR
select ekpoebeln ekpoposnr
ekpomatnr ekpoTXZ01 mbew~STPRS
into table tb_ekpo_mbew
from EKPO join MBEW
on EKPOmantr = MBEWmatnr
and EKPOBWTAR = MBEWBWTAR
where (your where condition)
Regards,
Abhishek
‎2007 Nov 27 1:25 PM
Hi,
Better to use FOR ALL ENTRIES it will be performance wise good
select matnr txzo1
from EKPO
into table it_ekpo
where condition.
if not it_ekpo[] is initial.
select stprs
from mbew
into tbale it_mbew
for all entries in it_ekpo
where matnr eq it_ekpo-matnr.
endif.
Regards,
Prashant
‎2007 Nov 27 2:01 PM
Hi,
I tried with your code,
But it shows dump like,
The data that was read could not be written to the specified target field during a SELECT access. Either the conversion is not supported for the type of the target field, or the target field is too short to accept the value, or the data is not in the appropriateformat for the target field.
Thanks.
‎2007 Nov 27 2:10 PM
Jasmine,
Can you paste internal table declaration here?
Regards,
Satish
‎2007 Nov 27 2:16 PM
Hi Sathish,
I cleared that error and I used Prasanth code. But now it displays standars price only. Its not displaying the Matnr and Description.
My code is,
select matnr TXZ01
from EKPO into corresponding fields of table rep_search .
if not rep_search is initial.
select stprs from mbew into corresponding fields of table rep_search for all entries in rep_search.
where matnr eq rep_search-matnr .
endif.
Thanks.
‎2007 Nov 27 2:28 PM
select matnr TXZ01
from EKPO into corresponding fields of table rep_search .
if not rep_search is initial.
select mbewmatnr mbewstprs makt~maktx from mbew
join MAKTX on maktmatnr= mbewmatnr and makt~spras = sy-langu into corresponding fields of table rep_search for all entries in rep_search.
where matnr eq rep_search-matnr .
endif.
Message was edited by:
Jacek Slowikowski
Message was edited by:
Jacek Slowikowski