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

Inner join statement correction

Former Member
0 Likes
324

For three different tables we can write select statement like below?if any correction pleas correct it.

select *

from ekko as a

inner join ekpo as b

on aebeln = bebeln

inner join ekkn as c

on bebeln = cebeln

into corresponding fields of table gt_data

where a~zvoyn in s_zvoyn

and a~ekgrp in s_ekgrp

and a~ebeln in s_ebeln

and a~zbookref2 in s_bookr

and a~lifnr in s_lifnr

and a~waers in s_waers

and b~matnr in s_matnr

and c~kostl in s_kostl..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
294

HI Venkee,

Yes this query will work but to improve the performance

use the required field names in the order as they are in the table instead of ' * '

declare an internal table with this fields. assume gt_data

and

avoid using into corresponding.

Regards,

Md Ziauddin.

1 REPLY 1
Read only

Former Member
0 Likes
295

HI Venkee,

Yes this query will work but to improve the performance

use the required field names in the order as they are in the table instead of ' * '

declare an internal table with this fields. assume gt_data

and

avoid using into corresponding.

Regards,

Md Ziauddin.