SDDLAR – ABAP CDS View

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-ViewsABAP CDS ViewHANA CDS View
  upward 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 thruSE11 – Create ABAP Dictionary ViewEclipse, Web IDEConnect to HANA System thru Eclipse is pre-requisit for starting to build HANA CDS View.
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 DefinitionSE11 – 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 tablesSDDLAR 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.
ResidesApplication ServerApplication ServerHANA XS
DatabaseAny DatabaseAny DatabaseONLY HANA
SQLLike PL/SQL-VIEWOpen-SQLNative SQL
 have limited basic SQL functions like INNER JOIN or SELECTbasic SQL functions are INNER JOIN, OUTER JOIN, UNION, or SELECT. perform calculations, aggregations, grouping. Is nested viewsexplicit features for the HANA database + all other features of ABAP CDS View
AIM ABAP ApplicationsNative HANA Applications
Main Focus Create VIEWSCreate MODELs
Analytics – Intended YesNO ?

Some good link for detail-reading , in case interested


DDDDLSRCT table contains NAMES of all CDS-Views in S/4HANA

Input/selection – SE16N

Gives below result

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.


Some-useful TCODES

  • 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&gt;:<port>/Fiori#AnalyticQuery-analyze?XQUERY=2Cxxxxx&XPROMPT=true ). This is similar to use VARIABLE_SCREEN=X in RSRT

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.