« Previous Index Next Q:11-20 »
Questions: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10
You may also be interested in Core Data Services Basics, ABAP 7.5x Basics, Eclipse for ABAPers and ABAP HANA Interview Questions.
Google Translate @ Sidebar
Question #1: What is SAP HANA CDS view?
Answer:
Core Data Services (CDS) as the name suggests, is a service directly by HANA core. To present CDS in a very understandable manner, CDS is a view of one or multiple tables and can be enriched with metadata which makes it even more useful than just a pile of dumb data. Just to mention some pointers which will help to understand why CDS framework is more useful:
- CDS artifacts are present and execute on database(HANA or other) layer. This strategy is called code push down where Application layer logic can be easily moved to Database layer for execution. This has many performance advantages if used carefully.
- Can be assigned to authorization object and visibility can be easily controlled
- CDS view can be easily consumed by oData service
- Can provide semantic information to each field which is particularly helpful when information is to be displayed on browser
- CDS can be buffered just like a transparent table
- Can be enabled for Search
- CDS can be used to define Data Hierarchy and relationships which is particularly helpful is navigation and drill downs
HANA is in memory database and performance capabilities can be leveraged only when calculations are done in-memory. If the business logic is fully written on the application layer and this defeats the purpose of in-memory computation. New HANA artifacts like CDS, AMDP(ABAP Managed Database Procedure), CTE(Common Table Expressions) etc. fully complement code push down and are designed for performance optimization.
.
.
.
Question #2: Which three TADIR objects/artifacts are created on activation of a ABAP HANA CDS?
Answer:
The artifacts created during CDS creation are:
- DDLS(Data Definition Language Source) – We enter DDLS name along with package name and Description
- VIEW(A structure which can be seen in SE11) – is mentioned with annotation @AbapCatalog.sqlViewName. Just press Control and Click on View name and it leads to SE11 structure
- STOB(Structured Object) – is mentioned with ‘define view’ or ‘extend view’ syntax.
.
.
.
Question #3: How many types of ABAP HANA CDS views are there?
Answer:
CDS view is evolving and new features are added with almost every technical release.
- CDS view
- Basic CDS view
- CDS View with Join
- CDS View with Association
- CDS View with Parameters
- Extended CDS view
- CDS View on View
- Table Function
- Normal Table Function
- Table Function with Parameters
- Abstract Entity
- Normal Abstract Entity
- Abstract Entity with Parameters
.
.
.
Question #4: What is Association and Path expression in ABAP HANA CDS?
Answer:
Association
Association is different than join in that sense that association defines how two entities are connected to each other. It is sometimes understood as “Conceptual Thinking” also because its nature of linking entities rather than joining them directly. The join may be the next step once the association is defined.

Cardinality
In database design, the cardinality or fundamental principle of one data aspect with respect to another is a critical feature. The relationship of one to the other must be precise and exact between each other in order to explain how each aspect links together.
In the relational model, tables can be related as any of “one-to-many”, “many-to-many” “one-to-zero-or-one”, etc.. This is said to be the cardinality of a given table in relation to another.
In terms of SAP:
- A [1..1] B means that for every row of A, there is a unique row in B and vice versa
- A[0..1] B or just A [1] B means that B may have a record for which there no source information in A.
- A [0..*] B means that B may have many records for which there no source information in A.
Path Expressions
Path expressions identify an object by describing how to navigate to it to objects via steps/route. For example, the path expression Object.Employee.Address.ZipCode can refer to Zip Code of particular Employee’s address. Of course, this relationship should be established beforehand using association/cardinality to use this kind of Path to access particular information.
.
.
.
Question #5: Can ABAP HANA CDS view have a tabular parameter(as of ABAP 7.52)?
Answer:
No, CDS view takes only scalar parameters(till ABAP release 7.52)
.
.
.
Question #6: Is it possible to have optional parameters for ABAP HANA CDS view?
Answer:
Yes! Read more HERE.
.
.
.
Question #7: What are Table Functions with CDS?
Answer:
A Table function is an integral part of CDS evolution which challenges CDS to do more! It is essentially a Code push down mechanism just like a CDS entity. We call Table function a CDS Data Definition Language(DDL) which uses syntax DEFINE TABLE FUNCTION. Read more HERE.
.
.
.
Question #8: Name at least 2 CDS session variables?
Answer:
As of ABAP 7.51, CDS framework provides some runtime system variables which can be readily used to make CDS more optimal and feature-rich. These session variables sometimes also discard the need of parameterization of CDS view.
- $session.client is runtime SAP client which is equivalent to sy-mandt in AS ABAP
- $session.system_date is current system date and works same as sy-datum in AS ABAP
- $session.system_language works very similar to sy-langu in AS ABAP
- $session.user is essentially same as sy-uname in AS ABAP
.
.
.
Question #9Compare the performance of New Open SQL, CDS, AMDP and CTE?
Answer:
You may find comparison HERE.
.
.
.
Question #10: Discuss best practices for using Code Push Down?
Answer:
You may find best practices HERE.
9 thoughts on “SAP ABAP HANA CDS Interview Questions”