CDS View Questions
CDS View Questions
Abap
CDS
Ques ons
Sonu Jangir Abap Developer
Cardinality
In database design, the cardinality or fundamental principle of one data aspect
with respect to another is a cri cal feature. The rela onship of one to the other
must be precise and exact between each other in order to explain how each
aspect links together.
@AbapCatalog.sqlViewName: 'DEMO_VIEW_ANNOT'
Which between ABAP CDS en ty and CDS view should be used to query CDS
in ABAP program?
@AbapCatalog.sqlViewName: 'TEST_CDS_01'
@AccessControl.authoriza onCheck: #CHECK
@EndUserText.label: 'Demo View with Annota ons'
Cyclical dependencies can cause syntax error in CDS code. Normally they are
not reported un l CDS view is ac vated.
How to create oData service from a CDS?
A special annota on oData.Publish is used to create oData service from within
CDS view and that is also out of box. e.g.
@AbapCatalog.sqlViewName: 'VIEW1'
oData.Publish: True
define view TEST_VIEW1 as
select from
TEST_VIEW2
{ ...some Selec on... }
4. system variables
$session. Client is run me SAP client which is equivalent to sy-mandt in
AS ABAP
In this example, a new CDS view “ZFlights_D” is defined as the test double for
the original view “ZFlights”. The data for the test double is provided by the
“zfwk_test_dbl_view_provider” class using the “provide_view” method.
ABAP CDS Hierarchical Tes ng.
To perform ABAP CDS Hierarchical Tes ng, developers can use the ABAP Unit
Tes ng framework, which provides a comprehensive set of tools and features
to automate and simplify the tes ng process.
Types of views