Explaining the ABAP CDS
Now that we have created our first CDS, let’s check some explanations.
CDS have two major components, 1) SQL Statements and 2) Annotations.
Anything with ‘@’ is annotation. It can be at the header or it can be at line items. Different annotations have different functions and their list is long. Some are already available on SAP in a minute.
Check both the names in red boxes in the SE11 transaction. In the new CDS, the first annotation – sqlViewname is no longer needed. That means, the new CDS does not create any view object.
Both SQLviewname and CDS name can be used in the select statement in the program. But, I strongly advise you to use the CDS name.
select * from zfirstcds_mara into TABLE @DATA(lt_mara1). select * FROM zfirstcds INTO TABLE @DATA(lt_mara2).
A CDS can be consumed in a program or in another CDS object. CDS Views are just like SQL statements but they can do more. Do not expect much performance improvement, if your CDS can be replaced by a normal SQL statement. The purpose of using CDS should be to push the calculation to HANA. Check out the CDS blog list for more on this topic.
If you like our content, follow us on LinkedIn and spread the word.