Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Getting Dump while using inner join

Former Member
0 Likes
1,123

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.

8 REPLIES 8
Read only

Former Member
0 Likes
931

It will be helpful if you can post your code.

Regards,

Mohaiyuddin

Read only

Sm1tje
Active Contributor
0 Likes
931

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.

Read only

Former Member
0 Likes
931

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

Read only

Former Member
0 Likes
931

Post ur innerhjoin query

Read only

Former Member
0 Likes
931

Hi,

I think you are joining cluster (or) pooled tables. you can post your code.

Regards,

Suresh.

Read only

Former Member
0 Likes
931

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

Read only

Former Member
0 Likes
931

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

Read only

Former Member
0 Likes
931

Hello Poonam,

Kindly post your code, until then, I'm afraid, no one will be able to help you.

regards,

Advait