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: 

abap reports

Former Member
0 Kudos

how to select records from two tables without any primary key between them?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI

Its not possible to create a table wihout a primary key .

Its possible to create a structure without a primary key.

So for every table in SAP there must be a primary key

Rewar dif usefull

5 REPLIES 5

Former Member
0 Kudos

HI

Its not possible to create a table wihout a primary key .

Its possible to create a structure without a primary key.

So for every table in SAP there must be a primary key

Rewar dif usefull

former_member386202
Active Contributor
0 Kudos

Hi,

I think its not possible

Regards,

Prashant

Former Member
0 Kudos

hi sujit,

welcome to sdn forum.

to retreive data from 2 tables without any key in common.

u can create an internal table using begin of statement.

then use the queries :

select * from table1 into corresponding fields of itab where cond.

select * from table2 into corresponding fields of itab where cond.

loop at itab into wa.

write : wa-f1,wa-f2......

endloop.

former_member1052991
Active Participant
0 Kudos

Hi sujit sahoo,

its not possible to create table without a primary key.

If you want to get the fields from two tables means, you can use views.

Former Member
0 Kudos

Hi,

Sujit

u mean to say there is no relationship between those tables

if u have data in common then it is possible to estabilish connection between thos two tables as concered with the program

try like this

do.

read table tabl1_name where condition.

read table tab2_name where conditon(i.e. data based on the previuosly retrieved)

append work area to internal_table.

if .

some exit condition.

endif.

enddo.

plzzz reward if usefull.

feel free to ask any quiries

my mail id is mutyalasunilkumar@gmail.com

dont forget to reward.