What is CoreDataService aka CDS ?
CDS views are part of SAP’s new programming model. Core Data Services, or CDS, is a “semantically rich” Data Definition Language (or DDL) created by SAP. It provides an easy to understand and reusable tool that ABAP developers can utilize to execute the “code pushdown” paradigm. CDS has evolved into different variants
ABAP Dictionary View Vs ABAP CDS View Vs HANA CDS View
|ABAP Dictonary VIEW or Database-Views||ABAP CDS View||HANA CDS View|
compatibility to S/4|
easy generation of full-fledged OData Services
easy use of SAP UI5 Smart Controls and Fiori Elements
implicit authorization checks
performance boost (see below)
|Creation thru||SE11 – Create ABAP Dictionary View||Eclipse, Web IDE||Connect
to HANA System thru Eclipse is pre-requisit for starting to build HANA CDS
You Should have permissions to create views and run SQL on the SYSTEM schema
In addition, your SAP Netweaver AS system is connected to this HANA DB (as either a primary DB or a secondary DB)
In Eclipse – open HANA Prespective, Go to Project-Explorer, create a project, add workspace.. etc. Create DDL Source File and then add ABAP-CDS code
|See VIEW Definition||SE11 – Choose the option VIEWS and enter the view name and press display. Now go to the tab TABLE/JOIN CONDITIONS. Here you can see the tables||SDDLAR
Enter View-name to See the View-Definition &Query in GUI|
FIORI App VIEW-Browser
* In DDDDLSRCT table you can find NAME-Listing & Activation-status of all the available CDS views in S/4HANA system.
|* In DDDDLSRCT table you can find NAME-Listing & Activation-status of all the available CDS views in S/4HANA system.|
|Resides||Application Server||Application Server||HANA XS|
|Database||Any Database||Any Database||ONLY HANA|
|SQL||Like PL/SQL-VIEW||Open-SQL||Native SQL|
|have limited basic SQL functions like INNER JOIN or SELECT||basic SQL functions are INNER JOIN, OUTER JOIN, UNION, or SELECT. perform calculations, aggregations, grouping. Is nested views||explicit features for the HANA database + all other features of ABAP CDS View|
|AIM||ABAP Applications||Native HANA Applications|
|Main Focus||Create VIEWS||Create MODELs|
|Analytics – Intended||Yes||NO ?|
Some good link for detail-reading , in case interested
- A comparision between ABAP CDS view and ABAP-Dictorary View
- Difference between ABAP CDS View & HANA CDS View
- READ THIS FIRST, before coding ABAP CDS
DDDDLSRCT table contains NAMES of all CDS-Views in S/4HANA
Input/selection – SE16N
SDDLAR TCODE to see the ABAP-CDS View Definition
With the report RUTDDLSSHOW2 (or Transaction SDDLAR) the definition of CDS Views (query and provider) can be displayed in the SAP GUI
In t-code SDDLAR (CDS Analysis and Repair Tools) in backend ABAP system, it shows other ABAP CDS views consuming the current view based on name.
Choose option ‘Display DDL Source’ and click on ‘Analyze’ button.
In the ‘Regular Expression (partial match)’ section, provide the name of ABAP CDS for which you want to do where used and check the ‘Ignore Case’ flag. Click Execute.
It will scan through the other ABAP CDS views to find the name of the searched view in their code.
Since this is a code scan of the ABAP CDS, it might also return some additional results based on usage of name as regular expression.
FIORI App to View list of ABAP CDS views – S/4HANA View Browser
The View Browser is a tool used to explore ABAP Core Data Services(CDS) views supplied by SAP and custom CDS views created by customers. You can search, browse, tag analytical and non-analytical queries.
The View Browser is fiori app available as tile in SAP Fiori Launchpad.
Using this new View Browser tool you can explore all types of CDS views: Basic, Composite, Consumption and Extension.
- With the report RUTDDLSSHOW2 (or Transaction SDDLAR) the definition of CDS Views (query and provider) can be displayed in the SAP GUI
- Transaction SE80, click button ‘Edit Objects’, input DDLNAME, CDS view definition can be displayed
- Transaction SE11, display Database table by input SQLVIEWNAME, the sqlview structure can be displayed. Then double click the DDLNAME there, CDS view definition can be displayed. (Attention: The function supported in SE11 for CDS is limited. Therefore consistency check in SE11 may not reflect the true status of DB and runtime objects, please run the CDS consistency check in TA SDDLAR instead.) – ALSO FOR ABAP CDS view, SE11 does not work.
- Transaction RSRTS_ODP_DIS can be used to check transient providers
- The connection between DDLNAME and SQLVIEWNAME can be found in SQL View RSODPABAPCDSVIEW, see also CDS Views: Naming Conventions
- Transient query definition can be checked via report RSRTS_CDS_QUERY_CHECK
- Transaction SACM provides several quick links for Access Control Management, e.g. manual authorization test for CDS Views
- CDS authorization can be also checked directly using the ABAP report R_ACMTOOL_SELECT (part of SACM)
- In Fiori Design Studio , to force variable screen display, add parameter &XPROMPT=true into the URL (example: https://<server>:<port>/Fiori#AnalyticQuery-analyze?XQUERY=2Cxxxxx&XPROMPT=true ). This is similar to use VARIABLE_SCREEN=X in RSRT