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

view key fields

Former Member
0 Likes
5,854

Hello experts,

I am facing an issue while creating a view (issue concerning the view’s key fields).

I am taking fields from tables VBAK and VBPA as following:

As you can see, all the fields were selected by default as key fields and I can’t select my own key fields.

Here is my table/join conditions

How can I choose my own key fields?

Thanks.

Amine

1 ACCEPTED SOLUTION
Read only

wol
Active Participant
0 Likes
3,694

Hello Amine,

the key fields shown in a view are the result from the join.

If your join uses all key fields of one table, the result are all key fields of the other table (which in this case of course includes the key fields of the first table). So only if the view has logically seen a "key" not all fields are marked as key fields.

Hope I told it understandable.

Regards,

Stefan

6 REPLIES 6
Read only

wol
Active Participant
0 Likes
3,695

Hello Amine,

the key fields shown in a view are the result from the join.

If your join uses all key fields of one table, the result are all key fields of the other table (which in this case of course includes the key fields of the first table). So only if the view has logically seen a "key" not all fields are marked as key fields.

Hope I told it understandable.

Regards,

Stefan

Read only

wol
Active Participant
0 Likes
3,694

Hello Amine,

I just checked the tables and saw your join uses all key fields (MANDT, VBELN).

To have only the logical key fields marked as key you can change the order of the key. I. e. first fields must be the logical key fields of the tables. Then the other fields dont´t get the key mark:

Regards,

Stefan

Read only

Former Member
0 Likes
3,694

Hi Stefan,

Thank you so much, my issue is resolved.

I didn't know that the order of fields can influence the view key.

Thanks.

Amine

Read only

former_member212705
Active Participant
0 Likes
3,694

Hi Amine,

Can you tell me which view you are creating as i am got getting such error while creating database view as well as maintenance view.

Regards,

A.Trivedi

Read only

0 Likes
3,694

Hi Ashish.

Actually I am creating a Database view. The goal is to built an extrator on it and repicate it on BW.

Thanks.

Amine

Read only

0 Likes
3,694

Okay Amine.