Академический Документы
Профессиональный Документы
Культура Документы
DRAFT VERSION
Period of the tests: 20/11/2017 - ??/??/????
Contents
1. CDS ............................................................................................................................................................. 2
2. Technical documentation ............................................................................................................................ 4
2.1 CDS View references in blogs, wikis, … ............................................................................................ 4
https://wiki.scn.sap.com/wiki/display/BI/CDS+Views%3A+Tools+and+Tables .......................................... 4
https://wiki.scn.sap.com/wiki/display/BI/CDS+Views%3A+Naming+Conventions...................................... 4
https://blogs.sap.com/2016/10/12/abap-cds-views-reporting-tools/ ............................................................ 5
2.2 S/4HANA Help.sap.com – ABAP Documentation > ABAP CDS in ABAP Dictionary (Development
perspective) ..................................................................................................................................................11
2.3 HANA 2.0 Platform – help.sap.com ..................................................................................................13
2.4 SAP Wiki pages info for CDS annotations .......................................................................................13
3. Ways to find CDS view & information .......................................................................................................14
3.1 1610 FPS1 - Help.sap.com – Cross Components > CDS Views (Functional perspective) .............14
3.2 1709 FPS00 - Help.sap.com – Analytics > CDS views ....................................................................15
3.3 Search for a CDS from a Transparent Table ....................................................................................18
3.4 SE11 in table RSODPABAPCDSVIEW ............................................................................................22
3.4.1 Example: Incoming Sales Order Cube .........................................................................................23
3.4.2 All CDS that begins with “I_” (S/4HANA 1610 FPS01 system) ....................................................28
3.5 Fiori App – View Browser (16.661 views in 1610 FPS1, ??? in 1709) .............................................29
3.5.1 View Browser - I_SalesOrderItemCube .................................................................................29
3.5.2 Query Browser in C_SALESORDERITEMQRY > Multi-dimensional Reports and Visualizations >
Fiori Tile (Comment: the CDS I_SalesOrderItemCube was not found in the Query Browser because
it’s not a Query) .........................................................................................................................................31
3.6 SAP Analysis for Excel .....................................................................................................................46
https://blogs.sap.com/2016/10/12/abap-cds-views-reporting-tools/ ..........................................................48
3.7 Eclipse for ABAP – Example 1: CDS Cube I_SalesOrderItemCube ................................................51
3.7.1 Identify the CDS (in this example the Incoming Sales Order Cube from the help.sap.com) .......51
3.7.2 Install Eclipse Neon and ABAP Development Tools for SAP NetWeaver ...................................51
3.7.3 Open ABAP Perspective in Eclipse ..............................................................................................52
3.7.4 Create a new ABAP Project for the S/4HANA instance ...............................................................53
3.7.5 Open the CDS ..............................................................................................................................55
3.7.6 Open the CDS in ABAP Repository Tree .....................................................................................58
3.7.7 Data Preview ................................................................................................................................59
3.7.8 Open .............................................................................................................................................61
3.8 Eclipse for ABAP – Example 2: Query C_SALESORDERITEMQRY ..............................................63
3.9 Eclipse for ABAP – Example 3: SQL View of the CDS (object visible in SE11) ..............................65
SAP Partner Solution Center LAC 2
3.10 Verify the DDL Source code from SAPGUI, report RUTDDLSSHOW2 ...........................................67
3.11 Display TransientProvider Preview for Operational Data Provider ..................................................68
3.12 Test the analytic query (consumption view) via Query Monitor (transaction code – RSRT) ............69
3.13 SAC – SAP Analytics Cloud .............................................................................................................74
1. CDS
SAP Partner Solution Center LAC 3
SAP Partner Solution Center LAC 4
2. Technical documentation
2.1 CDS View references in blogs, wikis, …
https://wiki.scn.sap.com/wiki/display/BI/CDS+Views%3A+Tools+and+Tables
With the report RUTDDLSSHOW2 the definition of CDS Views (query and provider) can be displayed in the SAP GUI
Transaction RSRTS_ODP_DIS can be used to check transient providers
The connection between DDLNAME and SQLVIEWNAME can be found in table RSODPABAPCDSVIEW, see
also CDS Views: Naming Conventions (see tests in item “3.4 SE11 in table RSODPABAPCDSVIEW”)
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(see note 2128709)
CDS authorization can be also checked directly using the ABAP report R_ACMTOOL_SELECT (part of SACM)
https://wiki.scn.sap.com/wiki/display/BI/CDS+Views%3A+Naming+Conventions
Table RSODPABAPCDSVIEW
https://blogs.sap.com/2016/10/12/abap-cds-views-reporting-tools/
ABAP CDS Views and Reporting Tools
October 12, 2016 | 9,450 Views |
Shen Sundaresan
more by this author
SAP NetWeaver Application Server for ABAP
SAP BusinessObjects Analysis for Microsoft OfficeSAP Fiori
In this blog, I would like to briefly describe how easy is to build reports using ABAP CDS views in SAP.
As you may already know, there are various reporting tools such as BusinessObjects, Lumira, Fiori,
Analysis for Microsoft Excel, BEx Analyser/Designer, Design Studio, etc. available in SAP. ABAP CDS
View data can be consumed from one of the tools above to generate reports.
Let us look at the basics of CDS views. There are 3 types of ABAP CDS views available in SAP and they
are
Note: ABAP CDS views are similar to Hana Views (attribute views, analytic views and calculation
views) but they are database independent and lie on the Application layer. On the other hand, Hana views
are specific to Hana database and lie on the database layer.
1.2 Basic view with data category #CUBE below contains the associations,
Once the basic views are defined, we should create a composite view.
2. Here is a simple CDS view with view type #COMPOSITE and data
category #CUBE
SAP Partner Solution Center LAC 7
When activating the composite CDS View, it creates a transient provider with the naming convention
2C<SQLViewName>
In this case, 2CZVGLDOCS1
3. Now we have the composite view ready. The following is a simple Consumption
view with the annotation @Analytics.query
On activation, this would create a transient query with the naming convention 2C<SQLViewName>
In this case, 2CZCACCDOC
4. Test the analytic query (consumption view) via Query Monitor (transaction
code – RSRT)
Now we have the CDS views ready. We should be able to test the analytic query (consumption view) via
Query Monitor (transaction code – RSRT)
OData Service with a naming conversion <CDSViewName>_CDS will be created automatically. In this
case, Z_C_ACCOUNTINGDOCUMENTS_CDS
Note: Odata will be created but we should register the service manually via transaction
/IWFND/MAINT_SERVICE
The following report is created using KPI design tools and the Odata service above
Data in table format. Filters can be applied to create custom reports, which can be exported to excel from
Fiori
SAP Partner Solution Center LAC 9
Users should be able to use this, slice and dice and generate reports
SAP Partner Solution Center LAC 10
“Refresh All” button can be used to get the most updated data.
Note: Hierarchies can also be built using CDS views (the above screen shot shows a report with G/L
account hierarchy)
BEx Analyser and Designer tools are quite old. Transient queries that are generated from CDS Views can
be exposed to BEx Analyser/Designer and generate reports.
I have not tested these with BusinessObjects or Lumira. Any input on these are appreciated.
https://blogs.sap.com/2016/09/26/core-data-services-cds-in-sap-s4-hana/
https://help.sap.com/doc/abapdocu_740_index_htm/7.40/en-US/index.htm?file=abencds.htm
SAP Partner Solution Center LAC 12
The CDS database view is a read-only classic database view in ABAP Dictionary. The
name CDS_DB_VIEW of this view is defined in the definition of a CDS view in the CDS
annotation @AbapCatalog.sqlViewName. The ABAP Dictionary tool in ABAP Workbench (SE11) can
display a CDS database view, but it cannot be edited here. When the view is activated, the corresponding
SQL view is created with the same name.
As a data type in ABAP Dictionary, the CDS database view represents (like all classic database views) a
flat structure with the elements of the CDS view as components.
o In ABAP, the CDS database view can (using its name CDS_DB_VIEW) be used wherever database
tables or classic database views can also be specified, such as after the TYPE addition, in reading
Open SQL statements, but also in Native SQL or after the TABLES statement. An exception to this
are Open SQL writes.
o In ABAP Dictionary, the CDS database view can also be used like any classic structure, such as the
type of a substructure, as an include structure, or as the row type of a table type.
A CDS entity
SAP Partner Solution Center LAC 13
The CDS entity is the actual CDS view. It covers the CDS database view and makes other attributes
possible, such as authorization checks defined in CDS. The name of this view, cds_entity, is defined in
the definition of a CDS view after DEFINE VIEW. The definition of the CDS entity occurs only as CDS
source code. The ABAP Dictionary tool in ABAP Workbench (SE11) does not recognize the CDS entity.
As a data type in ABAP Dictionary, the CDS entity represents a structured type with the elements of the
CDS view as components.
o In ABAP, the CDS entity can be specified after the TYPE addition using its name cds_entity. This
lets it reference the structure type defined by the view fields of the CDS view in ABAP programs and
it can be used in Open SQL statement reads (but not in Native SQL). The components of the
structured type can, as usual, be specified using the structure component selector cds_entity-
comp.
o The CDS entity cannot be used as a data type in ABAP Dictionary. It cannot, for example, be used
as a type of a substructure, as an include structure, or as the row type of a table type.
Both the names CDS_DB_VIEW and cds_entity are in the namespace of the data types in ABAP Dictionary. The
view is also known under both names within the DDL of the ABAP CDS. In general, only the CDS entity should be
accessed in ABAP programs and in other CDS entities using its name cds_entity and not the CDS database
view using the name CDS_DB_VIEW.
CDS Annotations -
2017 10 02.zip
Transaction: SE11
Table: VBAP (Sales order items)
SAP Partner Solution Center LAC 19
SAP Partner Solution Center LAC 20
SAP Partner Solution Center LAC 21
When a CDS is activated there are 3 types of objects created in TADIR (*) that are
linked in the table RSODPABAPCDSVIEW
Object Type in Table Description Comment 1 Comment 2
table TDIR RSODPABAPCDSVIEW
field
VIEW SQLVIEWNAME Name of SQL View ABAP Object Visible in SE11,
defined using
annotation
DDLS DDLNAME Name of CDS View The Name you enter
in CDS creation
wizard at first point
STOB STRUCTOBJNAME Name of view defined Technical Name / Name mentioned just
in CDS View Entity Name after Define View
syntax
Name needed to
consume the CDS in
ABAP
(*) The table TADIR is a system table which contains all system information. For example: program name, dev class, last modified by, version of the program:
PGMID : Program ID in Requests and Tasks.
OBJECT : Object Type.
OBJ_NAME : Object Name in Object Directory.
Table RSODPABAPCDSVIEW
SAP S/4HANA
Analytics CDS
I_SalesOrderItemCube
Transaction: SE16
Table: RSODPABAPCDSVIEW
Transaction: SE16
Table: TADIR
3.4.2 All CDS that begins with “I_” (S/4HANA 1610 FPS01 system)
S4 1610 FPS01 -
TABLE RSODPABAPCDSVIEW - CDS begining with I_.xlsx
SAP Partner Solution Center LAC 29
3.5 Fiori App – View Browser (16.661 views in 1610 FPS1, ??? in
1709)
App Name S/4HANA version Technical Catalog Business Profile
Catalog
View Browser 1610 FPS01 SAP_TC_CA_VDM_COMMON Not informed Not informed
View Browser 1709 SAP_TC_CA_VDM_COMMON Not informed Not informed
Query Browser 1709 SAP_TC_CA_VDM_COMMON SAP_CA_BC_VDM SAP_BR_EMPLOYEE
Roles:
* Analytics Specialist – View Browser
* Employee – Query Browser
The CDS I_SalesOrderItemCube is not displayed in the Query Browser because the Category of
I_SalesOrderItemCube is not Query
SAP Partner Solution Center LAC 33
C_SALESORDERITEMQRY
SAP Partner Solution Center LAC 34
SAP Partner Solution Center LAC 35
Click on Open for Analysis so that Multi-dimensional Reports and Visualizations can be performed with the
Query Data
SAP Partner Solution Center LAC 36
SAP Partner Solution Center LAC 37
SAP Partner Solution Center LAC 38
SAP Partner Solution Center LAC 39
SAP Partner Solution Center LAC 40
SAP Partner Solution Center LAC 41
SAP Partner Solution Center LAC 42
excel - From
Multi-dimensional Report.xlsx
SAP Partner Solution Center LAC 43
SAP Partner Solution Center LAC 44
We can also see the Query C_SALESORDERITEMQRY definitions in the View Browser
App (to verify the source CDS)
See in the blog below the reason for the naming convention. 2C<SQLViewName>
https://blogs.sap.com/2016/10/12/abap-cds-views-reporting-tools/
On activation, this would create a transient query with the naming convention
2C<SQLViewName>
Below the SQLViewName in the Query Browser App:
SAP Partner Solution Center LAC 49
SQLViewName: CSDSLSORDERITEMQ
SAP Partner Solution Center LAC 50
SAP Partner Solution Center LAC 51
I_SalesOrderItemCube
3.7.2 Install Eclipse Neon and ABAP Development Tools for SAP NetWeaver
Share: https://mdocs.sap.com/mcm/public/v1/open?shr=7tsVc45Ve_qZ2m_JKWKEYysadp3DtWUEa7daSI-yzaI
SAP Partner Solution Center LAC 52
PreRequisites -
Power week Brazil - v01.docx
Parameters – requested when we access the CDS in the Query Browser or Analysis
for Office
Right click > Show in > ABAP Repository Tree > System Lybrary
SAP Partner Solution Center LAC 59
3.7.8 Open
SAP Partner Solution Center LAC 62
SAP Partner Solution Center LAC 63
Right click > Show in > ABAP Repository Tree > System Lybrary
SAP Partner Solution Center LAC 65
3.9 Eclipse for ABAP – Example 3: SQL View of the CDS (object
visible in SE11)
When a CDS is activated there are 3 types of objects created in TADIR (*) that are
linked in the table RSODPABAPCDSVIEW
Object Type in Table Description Comment 1 Comment 2
table TDIR RSODPABAPCDSVIEW
field
VIEW SQLVIEWNAME Name of SQL View ABAP Object Visible in SE11,
defined using
annotation
DDLS DDLNAME Name of CDS View The Name you enter
in CDS creation
wizard at first point
STOB STRUCTOBJNAME Name of view defined Technical Name / Name mentioned just
in CDS View Entity Name after Define View
syntax
Name needed to
consume the CDS in
ABAP
Reference: https://wiki.scn.sap.com/wiki/display/BI/CDS+Views%3A+Tools+and+Tables
With the report RUTDDLSSHOW2 the definition of CDS Views (query and provider) can be displayed in the SAP GUI
Transaction: SE38
Program: RUTDDLSSHOW2
SAP Partner Solution Center LAC 68
DDL -
I_SALESORDERITEMCUBE.txt
Reference: https://wiki.scn.sap.com/wiki/display/BI/CDS+Views%3A+Tools+and+Tables
Transaction: RSRTS_ODP_DIS
SAP Partner Solution Center LAC 69
ISDSALESORDERIC
ODP
ISDSALESORDERIC.txt
3.12 Test the analytic query (consumption view) via Query Monitor
(transaction code – RSRT)
Reference: https://blogs.sap.com/2016/10/12/abap-cds-views-reporting-tools/
SAP Partner Solution Center LAC 70
On activation, this would create a transient query with the naming convention 2C<SQLViewName>
4. Test the analytic query (consumption view) via Query Monitor (transaction
code – RSRT)
Now we have the CDS views ready. We should be able to test the analytic query (consumption view) via
Query Monitor (transaction code – RSRT)
Transaction: RSRT
SQLVIEWNAME: 2CCSDSLSORDERITEMQ
SAP Partner Solution Center LAC 71
SAP Partner Solution Center LAC 72
2CISDSALESORDERIC/2CCSDSLSORDERITEMQ
SAP Partner Solution Center LAC 73
SAP Partner Solution Center LAC 74