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 creating Database view

Former Member
0 Likes
644

Hi ABAP experts,

I have created an ABAP database view with tables /SAPAPO/MATLOC, /SAPAPO/MATKEY and /SAPAPO/LOC.

I am taking snp planner (PLANNER_SNP) and ppds planner (PLANNER_PPS) from table /SAPAPO/MATLOC. I want their descriptions also in the same view which is there in an another database table /SAPAPO/PLANNER. but when i use this table in the join number of entries in the view appears to be zero. I dont know why..

Can anybody suggest me how can I put descriptions of SNP planner and PPDS planner also in the same view.

Also view is getting created with all the fields as key fields by default but I want only three feilds to be the key feilds.

Can anybody help in this matter.

Thanks a lot

Best Regards,

Chandan Dubey

1 ACCEPTED SOLUTION
Read only

MarcinPciak
Active Contributor
0 Likes
590

I can't see the structure of these tables but apparently your join condition is not well done. Ensure foreing keys for /SAPAPO/MATLOC exist in /SAPAPO/PLANNER (or vice versa dependig on which table has primary key) . Try doing a view first only with these two tables, then if this works expand it to the two other tables. This will give you an overview were is the logic (relationship) problem.

As for your second question system will suggest key relationship, of which you can delete some relations. In this case you don't need to use all of them but only part of the key fields to be compared. Just select relationship you don't want and delete it. when using this view only these fields will be used to formluate join condition.

I hope this helps you

Marcin

3 REPLIES 3
Read only

MarcinPciak
Active Contributor
0 Likes
591

I can't see the structure of these tables but apparently your join condition is not well done. Ensure foreing keys for /SAPAPO/MATLOC exist in /SAPAPO/PLANNER (or vice versa dependig on which table has primary key) . Try doing a view first only with these two tables, then if this works expand it to the two other tables. This will give you an overview were is the logic (relationship) problem.

As for your second question system will suggest key relationship, of which you can delete some relations. In this case you don't need to use all of them but only part of the key fields to be compared. Just select relationship you don't want and delete it. when using this view only these fields will be used to formluate join condition.

I hope this helps you

Marcin

Read only

Former Member
0 Likes
590

hi,

did u check manuvally in those tables whther those fields are values are not,

check some join fields data is present in all the tables are not.

thanq

rajesh.k

Read only

Former Member
0 Likes
590

Can you please tell me how you managed to make only some fields as key and the other as non-key....

Thanks,

Harsh