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

selecting fields from 2 different tables with single select query..

Former Member
0 Likes
3,898

hi...

can we select fields from two different tables in a single select query... under some where condition for both the tables...

the same thing can be done in sql what about in abap...

thanks...

1 ACCEPTED SOLUTION
Read only

abdul_hakim
Active Contributor
0 Likes
1,677

Hi Naveen,

You can do in ABAP Very well using Joins...

eg.

SELECT a~kunnr

a~name1

b~pernr

INTO TABLE itab

FROM kna1 AS a

INNER JOIN knvk AS b

ON akunnr = bkunnr.

hi...

can we select fields from two different tables in a single select query... under some where condition for both the tables...

the same thing can be done in sql what about in abap...

thanks...

2 REPLIES 2
Read only

Former Member
0 Likes
1,675

Yes,

By using joins we can select feilds from 2 different tables, criteria is the tables must have a common key amontg them.

Regards,

Raghav

Read only

abdul_hakim
Active Contributor
0 Likes
1,678

Hi Naveen,

You can do in ABAP Very well using Joins...

eg.

SELECT a~kunnr

a~name1

b~pernr

INTO TABLE itab

FROM kna1 AS a

INNER JOIN knvk AS b

ON akunnr = bkunnr.