cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between Basic view & Composite view in S/4 Hana CDS

sathishdhawan
Explorer
0 Kudos

Hi gurus...

Can anyone share the details about CDS views types...

As I practiced, Basic view and composite view functionalities are same. We can take tables directly from data base & we can also take other basic views to built a Basic view. so, Composite view also work in the same way Basic view does. then why we need these two different views.

Thanks

Sathish

Accepted Solutions (1)

Accepted Solutions (1)

Sean_Zhang
Product and Topic Expert
Product and Topic Expert
0 Kudos

I don't see the conflict when you're mentioning "But, while creation of composite view, I've taken DB tables instead of Basic or Composite views. It's working fine."

You could always do this, but you should not create basic view based on composite view.

In the meantime, this should be possible from modeling side in your example, because if you're creating a composite view which might include different information from multiple business term(tables), but you don't have basic CDS view up to now. so this should be allowed.

as I said, the basic and composite is a more layer concept from business modeling, you could even do what you like to, but that will introduce a problem when others want to use that.

so the annotation is something additional information to describe the CDS model besides the data.

and most the annotation will be used by framework or tools not by general programming code.

sometimes, I'm explaining to my colleagues why we need CDS field annotation in the following way(it might be not precise!)

CDS is building the entity for the digital world, while the association is building the relationship between entities, and the association is building the relationship between fields(when it's applied to field/column level)

so the two examples you mentioned is in the header part for one CDS, then it would be more likely describing the additional information for the consumer regarding the entity. And CDS modeling is a business modeling not a pure programming.

considering this, I would like to close my words. please be in the correct way when you're specifying the annotation even though you could specify a wrong value without any syntax error for most of the annotation.

Best Regards,

Sean

Answers (2)

Answers (2)

Prashant4
Explorer
0 Kudos

Hi sathish reddy,

You'll get your answer when you expose this view to BW / UI tool.

Regards,

Prashant Sharma.

Sean_Zhang
Product and Topic Expert
Product and Topic Expert
0 Kudos

Basic and Composite is something we take them from Layering perspective.

in which, the Basic view is the fundamental part of the CDS, which shall starts from DB tables or other basic views, but not composite. In the meantime, the basic view shall also restrict the complexity of the CDS, e.g. the tables under the basic shall not be too many.

that's why we call it basic, which will be reused generally by other higher level CDS.

and the Composite CDS shall be the composition of the Basic and other composite views, it could be a composition of different objection or concept, which could be reused in specific area or application.

From the functional perspective, there should be no difference. it's more likely a guideline and convention especially when you're developing a product, not a temporal prototype.

in the meantime, ATC could also check this convention or guideline in your system.

Overall, I would suggest that use the Basic and composite in the correct way according to your business model.

Hope the comments help you a bit.

Best Regards,

Sean

sathishdhawan
Explorer
0 Kudos

Hi Sean,

Thanks for reply.

You are saying like 'Basic view is the fundamental part of the CDS, which shall starts from DB tables or other basic views, but not composite.' But, while creation of composite view, I've taken DB tables instead of Basic or Composite views. It's working fine.

I've one more doubt.

1. In Basic view, there is one annotation. that is analytics.datacategory: #Cube / #Dimension / #Fact.

Thearitically i knew that If we use #Dimension, then we have to take master data, If we use #Fact, then we have to take Transaction data. If we use #Cube, then we have to take Transaction data surrounded by Master data. But in practical way, it is not working like that.

In the above view, I've taken data category as #Dimension. But I used Master data and Transaction data. It's working fine.

If I used #Cube in place of #Dimension, Same output is coming without any error. Then what is the use of Data category annotation.