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

crete a view...

Former Member
0 Likes
719

Hi All,

I want to create a view on two tables and check the Key option for all the fields in the view.

I found in the system that only the fields in the table with Key selection are automatically reflecting the key selection in the view.

I also want Non key fields in the table to be key fields in the view. In our system there are similar views.

Is it possible?

it is very very urgent

Hi All,

I want to create a view on two tables and check the Key option for all the fields in the view.

I found in the system that only the fields in the table with Key selection are automatically reflecting the key selection in the view.

I also want Non key fields in the table to be key fields in the view. In our system there are similar views.

Is it possible?

it is very very urgent

4 REPLIES 4
Read only

Former Member
0 Likes
682

Hi Prem,

I think it's not possible...View is nothing but the combination of two or more tables provided a foreign key relationship between two tables.

You can't make the non key fields from the table as key fields in the view.

Thanks,

Ponraj.s.

Read only

0 Likes
682

Hi,

I also find the same in the system.

But there are some views already created with non key fields in the table as key fields in the view.

Read only

Former Member
0 Likes
682

Hi,

The key for a view is determined automatically by SAP. We can not change the key. Please read below the F1 help content given by SAP ::

Flag if field belongs to key

This indicator shows whether the view field belongs to the key of the view.

The system automatically derives the key of a view from the key fields of the tables involved in the view and the join conditions.

The key is defined so that it satisfies the following requirements:

1. All the key fields must be stored together at the beginning. Fields that do not actually belong to the key but which lie between the key fields are also marked as key fields.

2. All the data records of the view are already unique in the key. If no key can be defined with this attribute, all the fields of the view are marked as key fields.

The key of a view has an effect when accessing the view data with OPEN SQL in ABAP programs. The key plays a direct role for example for SELECT SINGLE and for the supplement ORDER BY PRIMARY KEY, but it also plays an indirect role internally when compressing data with SELECT ... FOR ALL ENTRIES.

Hope this would be of some help!!!

Regards,

Lalit Kabra

Read only

Former Member
0 Likes
682

hi

Plz Refer to this link.

[;

Hope this will help.

Reward if Useful.

Sumit Agarwal