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

field selection from differant tables

Former Member
0 Likes
505

hello all,

i need to select differant fields from differant tables when i select common fields from both the tables, is it necessary that the common field need to be a primary key in both tables.

thanks in advance

seenu

1 ACCEPTED SOLUTION
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
477

HI,

No its not required that the common field be part of the primary key in both tables only thing is you need to prefix the table name if the field names are same. But if you are using a INNER JOIN then there is no need to select both fields since you know the content of both fields will be same if JOIN is ON these fileds as well.

Regards,

Sesh

Message was edited by:

Seshatalpasai Madala

4 REPLIES 4
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
478

HI,

No its not required that the common field be part of the primary key in both tables only thing is you need to prefix the table name if the field names are same. But if you are using a INNER JOIN then there is no need to select both fields since you know the content of both fields will be same if JOIN is ON these fileds as well.

Regards,

Sesh

Message was edited by:

Seshatalpasai Madala

Read only

p291102
Active Contributor
0 Likes
477

HI,

There is no necessity to the field will be the primary key field in that table.

If the particular field is primary key means u can take the data in very secured way that's all.

Thanks,

Shankar

Read only

Former Member
0 Likes
477

Hi,

You need to check the field name in eeach table the name of the field may be change in table you need to find out the values

or create sap query to check the common fields

or create a view for the same

Regards

Shiva

Read only

Former Member
0 Likes
477

Hi,

There is no need that the fields are primary keys . U can select the fileds from different tables Using INNER JOIN or FOR ALL ENTRIES.

Regards,

Shafi