‎2008 Dec 01 9:03 AM
Hi All,
I am selecting 20 fields from 2 different database table using inner join. While executing the report getting dump.
The purpose of using inner join is that in selection screen I have few fields from two different database table.
Any suggestion how I can go ahead for the same.
‎2008 Dec 01 9:05 AM
It will be helpful if you can post your code.
Regards,
Mohaiyuddin
‎2008 Dec 01 9:06 AM
this is normally caused by the fact that your internal table does not match the selected fields from the tables from the joins.
But better post the code first.
‎2008 Dec 01 9:07 AM
Hi Poonan
You can use select for all entries .
Select <Fields> from <dbtab1>
into table itab
Where condition.
If sy-subrc eq 0.
Select <Fields> from <dbtab2>
into table itab2
for all entries in itab
where A = itab-A
and so on.
endif.
Regards
Neha
‎2008 Dec 01 9:08 AM
‎2008 Dec 01 9:09 AM
Hi,
I think you are joining cluster (or) pooled tables. you can post your code.
Regards,
Suresh.
‎2008 Dec 01 9:09 AM
Hi Poonam
This happens either the fields of itab and the order or fields in the select query doen't match or
the data types you mentioned in the declaration of itab doesn't accomodate the values fetched from the select query.
if possible please let us know what is the dump you are getting
Regards
Ramchander Rao.K
‎2008 Dec 01 9:10 AM
this is the way of writing innerjoin
SELECT avbeln aauart aernam aerdat avkorg avtweg aspart akunnr alifsk anetwr
INTO CORRESPONDING FIELDS OF TABLE it_vbak
FROM vbak AS a
INNER JOIN vbuk AS b ON avbeln EQ bvbeln
WHERE a~vbeln IN s_vbeln
AND a~erdat IN s_erdat
AND a~kunnr IN s_kunnr
AND a~vkorg IN s_vkorg
AND a~ernam IN s_nam_so
AND a~auart IN s_auart
AND a~vtweg IN s_vtweg
AND a~spart IN s_spart
AND b~cmgst EQ c_credit_stat.
Regards,
Ajay
‎2008 Dec 01 9:13 AM
Hello Poonam,
Kindly post your code, until then, I'm afraid, no one will be able to help you.
regards,
Advait