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

CDS on 2 database table

Former Member
0 Likes
1,170

Hi, I try to make project on abap development in eclipse that have 2 database table (A and B) that table A get foreign key from table B. When building CDS, i got confused because it is my first time not using /DMO/ and only based from database table.

This is my question:

1. On data defined as data model, what should i choose ? defined association or join?
2. On data defined as projection view, @Consumption.valueHelpDefinition: [{ entity: {} }], what should i define when i try to accessing the table B?
3. should i make entity for table B? i already defined the database table.

Thank you for your time and help.

1 ACCEPTED SOLUTION
Read only

former_member1716
Active Contributor
1,099

pakpak,

Using Associations or Joins depends on the business scenario you are in, from what i see in your requirement it would suffice if you can use Joins in the CDS.

However understanding the CDS and types is very important before getting onto any coding, recommend you to go through the below links for better understanding and it should improve your knowledge base in CDS.

LINK1

LINK2

LINK3

Regards!

3 REPLIES 3
Read only

former_member1716
Active Contributor
1,100

pakpak,

Using Associations or Joins depends on the business scenario you are in, from what i see in your requirement it would suffice if you can use Joins in the CDS.

However understanding the CDS and types is very important before getting onto any coding, recommend you to go through the below links for better understanding and it should improve your knowledge base in CDS.

LINK1

LINK2

LINK3

Regards!

Read only

0 Likes
1,099

Hi Satish Kumar !

Thank you for your answer. I really appreciate your link! I will study more ABAP development !

Read only

Former Member
0 Likes
1,099

Thanks for your view ! i already find out the answer by myself. Create Entity with data definitions View.