‎2008 Jun 07 1:20 PM
Hi
What to do to make possible to write 'inner join' statement using
pooled and normal table?
‎2008 Jun 07 1:25 PM
report test .
tables: pa0002,pa0008,pa0021.
data: begin of it_final occurs 0,
pernr like pa0002-pernr,
begda like pa0002-begda,
endda like pa0002-endda,
vorna like pa0002-vorna,
nachn like pa0002-nachn,
ansal like pa0008-ansal,
lga01 like pa0008-lga01,
bet01 like pa0008-bet01,
famsa like pa0021-famsa,
fanam like pa0021-fanam,
favor like pa0021-favor,
end of it_final .
select-options:s_pernr for pa0002-pernr.
select a~pernr
a~begda
a~endda
a~vorna
a~nachn
b~ansal
b~lga01
b~bet01
c~famsa
c~fanam
c~favor
from ( ( pa0002 as a inner join pa0008 as b on apernr = bpernr )
inner join pa0021 as c on apernr = cpernr and bpernr = cpernr )
into table it_final
where a~pernr in s_pernr.
sort it_final by pernr begda descending.
loop at it_final.
write:/ it_final-pernr,
it_final-begda,
it_final-endda,
it_final-vorna,
it_final-nachn,
it_final-ansal,
it_final-lga01,
it_final-bet01,
it_final-famsa,
it_final-fanam,
it_final-favor.
endloop.
‎2008 Jun 07 1:25 PM
report test .
tables: pa0002,pa0008,pa0021.
data: begin of it_final occurs 0,
pernr like pa0002-pernr,
begda like pa0002-begda,
endda like pa0002-endda,
vorna like pa0002-vorna,
nachn like pa0002-nachn,
ansal like pa0008-ansal,
lga01 like pa0008-lga01,
bet01 like pa0008-bet01,
famsa like pa0021-famsa,
fanam like pa0021-fanam,
favor like pa0021-favor,
end of it_final .
select-options:s_pernr for pa0002-pernr.
select a~pernr
a~begda
a~endda
a~vorna
a~nachn
b~ansal
b~lga01
b~bet01
c~famsa
c~fanam
c~favor
from ( ( pa0002 as a inner join pa0008 as b on apernr = bpernr )
inner join pa0021 as c on apernr = cpernr and bpernr = cpernr )
into table it_final
where a~pernr in s_pernr.
sort it_final by pernr begda descending.
loop at it_final.
write:/ it_final-pernr,
it_final-begda,
it_final-endda,
it_final-vorna,
it_final-nachn,
it_final-ansal,
it_final-lga01,
it_final-bet01,
it_final-famsa,
it_final-fanam,
it_final-favor.
endloop.
‎2008 Jun 07 1:32 PM
all tables participating in your 'inner join' statement are normal tables.
i am asking another
‎2008 Jun 07 1:35 PM
we can join transparent tables only .
we can't join pooled and cluster tables
‎2008 Jun 07 1:39 PM
i know. but may be there is some table or some program or some transaction
or utility which allows to configure something about pooled tables and
then to use them within 'inner join' statement.
‎2008 Jun 07 2:06 PM
Well there is something you can do, but not sure if one should really do this:
[Converting Pooled Tables to Transparent Tables|http://help.sap.com/saphelp_nw70/helpdata/EN/cf/21eb13446011d189700000e8322d00/content.htm]
‎2008 Jun 07 2:14 PM
‎2008 Jun 07 2:16 PM
I know, but you want to use it in an INNER JOIN, which is not possible for pooled/cluster tables, however a transparant table can. So by converting it, you can use it in your INNER JOIN.
‎2008 Jun 07 1:41 PM
try to make database view and relate pool and normal table there. because database view always use inner view.....
‎2008 Jun 07 1:48 PM
i tried to make as you said.
same error message appears as in abap editor.