‎2012 Oct 22 4:28 PM
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
‎2012 Oct 22 7:43 PM
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
‎2012 Oct 22 7:43 PM
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
‎2012 Oct 23 8:17 AM
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
‎2012 Oct 23 9:58 AM
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
‎2012 Oct 23 5:25 AM
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
‎2012 Oct 23 9:59 AM
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
‎2012 Oct 23 10:37 AM