Application Development 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: 

Help Reqd to populate Internal Table from two DB tables

Former Member
0 Kudos

Hi,

I want to do following:

DB Table 1 -> FieldA and FieldB

DB Table 2 -> FiledB and FieldC

Internal Table -> FieldA, FieldB and FieldC

Now for particular value ranges of FieldA I want to populate all fields of Internal Table.

Join between Table1 and Table2 should be left join (all fields of table1 and matched fields of table2)

I am not sure of the ABAP Statement, friends please help,

Thanks,

CD

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

Here is your select stement.

select t1fieldA t1fieldB t2~fieldC

into table itab

from table1 as t1 inner join table2 as t2 on

t1fieldB = t2fieldB

where fieldA in r_fieldA.

Regards

Raj

2 REPLIES 2

Former Member
0 Kudos

Hi

Here is your select stement.

select t1fieldA t1fieldB t2~fieldC

into table itab

from table1 as t1 inner join table2 as t2 on

t1fieldB = t2fieldB

where fieldA in r_fieldA.

Regards

Raj

0 Kudos

thanks