To find CDS (Core Data Services) views in SAP, you can use several methods depending on whether you're searching in SAP GUI or SAP S/4HANA's Eclipse-based ABAP Development Tools (ADT).
1. Using SAP GUI (SE11, SE16, SE80, ST05, or RSRT)
Method 1: Using SE11 (Data Dictionary)
- Open SE11 (ABAP Dictionary).
- Select View and enter the name of a known CDS view (e.g.,
I_BillingDocument
). - If you don't know the name, enter
E*
orI*
and use F4 Help to get a list of available views.
Method 2: Using SE16 (Table Browser)
- Open SE16 or SE16N.
- Enter Table Name:
DDLSOURCE
. - Execute (
F8
). - Apply filters like
DPC*
,I_*
,C_*
, orZ*
for custom CDS views.
Method 3: Using SE80 (Object Navigator)
- Open SE80.
- Select Repository Browser → Dictionary Objects.
- Search for objects starting with
DDL
orCDS
.
Method 4: Using ST05 (SQL Trace)
- Start ST05.
- Activate SQL Trace and execute an SAP Fiori app or query.
- Check the trace for CDS view names used in queries.
Method 5: Using RSRT (BW Query Analyzer)
If using embedded analytics:
- Open RSRT.
- Use
F4
Help to find BW Queries built on top of CDS views.
2. Using ADT (Eclipse) in SAP S/4HANA
Method 6: Searching in ADT
- Open Eclipse with ADT.
- Navigate to ABAP Development Tools.
- Use Ctrl + H → Select ABAP Repository Search.
- Enter a pattern like
I_*
,C_*
, orZ*
(for custom views). - Press Search.
Method 7: Using ADT Project Explorer
- Open ADT.
- Expand your Package (e.g.,
Z*
,S4CORE
). - Navigate to Dictionary → Data Definitions.
- View CDS definitions directly.
3. Using Tables for CDS Metadata
Method 8: Query Metadata Tables
You can check CDS views stored in SAP tables:
DDLSOURCE
→ Stores all CDS views.DDLDEPENDENCY
→ Shows dependent objects of CDS views.TADIR
→ CDS views can be filtered withR3TR DDLS
.
Example SQL Query (SE16, SE11, or ST05):
sqlSELECT * FROM DDLSOURCE WHERE NAME LIKE 'I_%' OR NAME LIKE 'Z_%'.
4. Using Fiori Apps (SAP S/4HANA)
Method 9: Using "View Browser" App
If using Fiori:
- Open Fiori Launchpad.
- Search for "View Browser".
- Use filters to find CDS views by application component.
5. Using Custom ABAP Report
If you want to list CDS views programmatically, you can write a simple ABAP report:
abapSELECT name FROM ddlsource INTO TABLE @DATA(cds_views) WHERE name LIKE 'Z%'. LOOP AT cds_views INTO DATA(view). WRITE: / view. ENDLOOP.
Summary
Method | Tool |
---|---|
SE11 | Check Data Dictionary |
SE16 | Query DDLSOURCE table |
SE80 | Browse Repository |
ST05 | SQL Trace for CDS usage |
RSRT | Find embedded analytics views |
Eclipse ADT | Search for CDS definitions |
TADIR, DDLSOURCE | Query Metadata Tables |
Fiori "View Browser" | Find standard & custom views |
Custom ABAP | List CDS views via SQL |
Would you like help identifying specific CDS views for your use case? 🚀
You said:
ChatGPT said:
What is a CDS View?
A CDS (Core Data Services) View is an advanced data modeling feature in SAP, primarily used in SAP S/4HANA and SAP BW/4HANA. It allows developers to define semantic, reusable, and optimized data models directly in the ABAP layer. CDS views extend the traditional ABAP Dictionary Views (SE11) and offer powerful features like:
✅ Performance Optimization: Push-down to HANA DB for fast execution.
✅ Annotations: Metadata for UI, security, and OData exposure.
✅ Joins, Associations, Projections: Simplifies data modeling.
✅ Extensibility: Can be enhanced without modifying the original view.
CDS Views are written in DDL (Data Definition Language) and are managed in ABAP Development Tools (ADT) in Eclipse.
Difference Between CDS Views and HANA Views
Feature | CDS View | HANA View |
---|---|---|
Technology | ABAP-based (SAP Application Layer) | HANA-native (Database Layer) |
Definition Tool | Created in Eclipse (ABAP Development Tools - ADT) | Created in HANA Studio or Web IDE |
Language | ABAP CDS (DDL) | HANA SQLScript |
Execution | Optimized for SAP applications (S/4HANA, BW/4HANA) | Generic, optimized for all HANA-based apps |
Security | Uses SAP Authorization (PFCG, S/4 roles) | Uses HANA DB privileges (GRANT/REVOKE) |
Transportability | Transported via SAP Transport Management System (CTS) | Transported separately via HANA Transport Container |
Usage | Preferred for S/4HANA Fiori apps, Embedded Analytics, ABAP Reports | Used for Native HANA models, external reporting (BW, SAC, Power BI) |
Extensibility | Allows annotations, associations, and enhancements | More rigid, changes require re-deployment |
OData Services | Direct OData exposure for Fiori/UI5 | Requires manual OData configuration |
When to Use CDS Views vs. HANA Views?
📌 Use CDS Views if:
- You need tight SAP integration (Fiori, ABAP Reports, Embedded Analytics).
- You want OData exposure for API or UI5 apps.
- You need security via SAP roles instead of DB privileges.
- You prefer extensibility & reusability via CDS annotations.
📌 Use HANA Views if:
- You require high-performance analytics at the database level.
- You are working with non-SAP applications needing HANA-native models.
- You need direct data access outside of SAP (e.g., Power BI, Tableau).
- You are using SAP BW/4HANA with complex transformations.
Example of a Simple CDS View (ABAP Layer)
sql@AbapCatalog.sqlViewName: 'ZSALES_CDS' @AccessControl.authorizationCheck: #NOT_REQUIRED @EndUserText.label: 'Sales Order Data' define view ZSales_Order as select from vbak association [1..1] to vbap as _Items on vbak.vbeln = _Items.vbeln { key vbak.vbeln, // Sales Order vbak.erdat, // Order Date vbak.kunnr, // Customer _Items.matnr, // Material _Items.netpr // Net Price }
This view joins VBAK (Sales Header) and VBAP (Sales Items), making it easy to retrieve sales order data in ABAP programs and Fiori apps.
Example of a HANA View (Database Layer)
sqlCREATE VIEW Sales_View AS SELECT vbak.vbeln, vbak.erdat, vbak.kunnr, vbap.matnr, vbap.netpr FROM sapabap1.vbak AS vbak JOIN sapabap1.vbap AS vbap ON vbak.vbeln = vbap.vbeln;
This HANA view is executed at the database level and is usable across HANA-native reporting tools.
Key Takeaways
✅ CDS Views = ABAP Layer, SAP S/4HANA, Embedded Analytics, Extensibility
✅ HANA Views = Database Layer, High Performance, External Tools, Native HANA Reporting
No comments:
Post a Comment