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

Problem with Key defination in views

praveen_hannu
Contributor
0 Likes
895

Hi Friends

I have created a database view which includes 3 tables(KNA1, VBAK and VBAP), while adding the fields in the fields list, it is considering all fields as key fields. I have done check and uncheck of modification of data element check box, it is showing as uncheck the key column, but once I activate the view, then it is selecting all fields are key fields. I have a problem when I am accessing this view from third party systems cause with these many key fields. Please tell me is there any way to choose key fields in the data base view.

Awaiting for your response.

Regards

Praveen

1 ACCEPTED SOLUTION
Read only

ThomasZloch
Active Contributor
0 Likes
675

Try adding all primary key fields of these three tables to the view (MANDT, VBELN, POSNR, KUNNR).

Thomas

3 REPLIES 3
Read only

ThomasZloch
Active Contributor
0 Likes
676

Try adding all primary key fields of these three tables to the view (MANDT, VBELN, POSNR, KUNNR).

Thomas

Read only

0 Likes
675

Hi Thomas

Thanks for your reply, I have added all key fields in the view, but still contains the same problem.

Regards

Praveen

Read only

0 Likes
675

Those fields should be on top of the view's field list. Also, the join conditions must be complete, e.g. also include MANDT, as far as I know.

The system defines all view fields as key fields, if it cannot otherwise determine a unique key based on the join conditions and the primary keys of the joined tables.

If that's not it, I have no further idea.

Thomas