SlideShare ist ein Scribd-Unternehmen logo
1 von 4
Downloaden Sie, um offline zu lesen
In the first Blog, we covered how SAP introduced a new data
modeling infrastructure in the form of Core Data Services and how a
CDS view is different from SE11 view. The focus of this blog will be
entirely on the steps involved in creating CDS View using Eclipse, on
different types of CDS views, and on how to use CDS view in ABAP
program.
It is very important that a developer understands that technically,
CDS is an enhancement of SQL which provides a Data Definition
Language (DDL) for defining semantically rich database tables/views
(CDS entities) and user-defined types in the database. Unlike the SAP
HANA CDS, ABAP CDS are independent of the database system. The
entities of the models defined in ABAP CDS provide enhanced access
functions compared with existing database tables and views defined
in ABAP Dictionary, making it possible to optimize Open SQL-based
applications. And it is because of these unparalleled advantages that
ABAP CDS is the most preferred form of methodology when it comes
to Code to Data paradigm.
DDL and CDS view Entity
When creating a CDS view in ADT tool, 2 entities get created.
1. DDL SQL view: DDL SQL view is read-only classical database view
(SE 11 view) which is visible in ABAP data dictionary(SE11).
2. CDS view entity: CDS view entity is a DDL source file and the
actual CDS view. It is a database object which is visible in ADT
tool. This is not visible in SE11.
Following points should be considered for DDL SQL view and CDS view
entity:
1. SQL view and CDS view entity can have the same name but
should be kept differently.
2. SQL view can be viewed in SE11 but it is not editable there
whereas CDS view entity is not available in SE11.
3. CDS view entity is used as a data type in ABAP program and as
data source in open SQL. SQL view can be used in a similar way,
but it behaves like a classical SE11 view.
4. CDS view entity can be deleted. Both SQL view and CDS view are
deleted together.
Steps to create CDS view:
1. Download Eclipse and ADT plugin
First, prepare development environment for CDS view. Eclipse is a
tool where a user creates ABAP developments on HANA. Before
downloading eclipse, ensure that JRE and SAP GUI are available on
system.
Blog
Technical Overview of CDS View for ABAPer - Part II
By Rashmi Bansal, Accrete Solutions
Once Eclipse has been installed, open it by a double-click on its
icon. Now, get ADT plugin to connect with ABAP backend system.
Go to HELP-> Install new software.
Click on the ADD button, give a name to plugin and location as a
site (https://tools.hana.ondemand.com/oxygen)
Click on next, accept terms and agreement, finish this
process. Wait for 2-3 minutes, Eclipse will ask for a restart for
itself. After restarting eclipse, click on the workbench icon.
Choose ‘ABAP Development tools for SAP Netweaver’
2. Create ABAP project Go to file->new->project->ABAP
project.
Click on next. Enter system information.
Click on next. Give a name of CDS view.
Click on next button. Enter username and password.
Click on next. It will ask for the project name. Enter the project
name and finish this process. Choose ABAP perspective. The
project will be available with folder Local objects($tmp).
3. Create CDS view
Right click on local object folder. Go to new->other ABAP
repository objects->core data services->Data definition or search
for DDL source.
Click on next. Next screen would ask for a transport request, assign a
new name to it.
Click on next. Here it will ask to choose one template for CDS view.
There are 5 options available, I have chosen the 1st option.
Click on finish. It will open CDS view in source code editor where
provide a name for DDL SQL view i.e. visible in SE11 and data source
name(table name). Notice how the description and CDS view name is
already assigned here.
Below example is a display of material information from MARA table.
Save and activate view.
Run as ABAP objects. In the above example, CDS view
ZCDS_SQL_MAT1 is visible in SE11. But view ZCDS_MATERIAL is not
available in SE11.
CDS view with parameters
With this developer can pass parameters to CDS views which
can be used in where clause of a select query. For example, if it
is required to fetch material data for a plant then pass plant as
parameters. You need to use ‘$parameters’ with parameter’s
name.
CDS view with Joins
When it is required to fetch data from multiple tables, use
joins. CDS supports inner join, left/outer join and cross joins.
There is no limit on the number of join expressions in a SELECT
statement of a CDS view in the DDL, but there is an ATC check
that produces a message once a specific number of expressions
is reached. In nested join expressions, parentheses are
recommended for making the code easier to read. In the case
of inner and outer joins, the parentheses can be specified
wherever the ON conditions specify parentheses implicitly.
Below is an example of CDS view with joins and parameters
where order type and plant number is passed as a parameter to
fetch all order numbers, order status, material number and
serial number information where material type is ‘finished
goods' and movement type is ‘261’.
CDS view with Associations
Associations allow us to replace joins with simple path
expressions in queries. Association is basically not a join as
such, it is just metadata about possible join connections. It’s
Join on Demand. Actual join is created when the association is
used in a path expression.
To understand how the association works, have a look in below
CDS view where a CDS view with the association on table
MARA, MAKT is created.
The above CDS, when executed, will give the below output.
It means no joins have taken place in association on table MARA and
MAKT. This association will work when it is specifically called in path
expression in the select query. Find below example where CDS view is
called in select query and association is also called in select query
path expression.
For all enquiries please contact at : corpinfo@accretesol.com , Tel : +1(877)-849-5838
Visit us at : Accrete Solutions
USA
Head Office
3350 Scott Blvd, Bldg 34
Santa Clara, CA 95054
South Africa
609 Lanseria Corporate Estate,
Falcon Lane, Lanseria,
Gauteng
Chile
Galvarino Gallardo 1638,
Providencia,
Santiago
India
Development Centre
102A, HARTRON, Electronics City,
Gurgaon
Copyright © Accrete Solutions 2018. All rights reserved.
By default, association gets converted into the left outer join. To make association as an inner join, specify it as view itself. In association,
cardinality shows a minimum and a maximum number of records, it does not show one to one or one to many relations.
In a nutshell
To summarize, an ABAP CDS, because of its abstract data modeling techniques, is much more significant compared to the options that were
available earlier in the data dictionary. The different types of ABAP CDS provide the whole plethora of using this abstract data modeling
techniques thereby making it possible to write easier yet semantically enriched data models for different kinds of applications, for example,
search applications, analytical applications, and transactional applications. The application logic is moved from the application server to the
database server ("code push down") and the data is processed where it is saved, thereby improving the performance.
In next blog, we will discuss CDS with Join Vs CDS with Association

Weitere ähnliche Inhalte

Was ist angesagt?

Chapter 01 user exits
Chapter 01 user exitsChapter 01 user exits
Chapter 01 user exits
Kranthi Kumar
 
Enhancement framework the new way to enhance your abap systems
Enhancement framework   the new way to enhance your abap systemsEnhancement framework   the new way to enhance your abap systems
Enhancement framework the new way to enhance your abap systems
Kranthi Kumar
 
Chapter 02 sap script forms
Chapter 02 sap script formsChapter 02 sap script forms
Chapter 02 sap script forms
Kranthi Kumar
 
BATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONBATCH DATA COMMUNICATION
BATCH DATA COMMUNICATION
Kranthi Kumar
 
Sap sapscripts tips and tricks
Sap sapscripts tips and tricksSap sapscripts tips and tricks
Sap sapscripts tips and tricks
Kranthi Kumar
 
Introducing enhancement framework.doc
Introducing enhancement framework.docIntroducing enhancement framework.doc
Introducing enhancement framework.doc
Kranthi Kumar
 

Was ist angesagt? (20)

Chapter 01 user exits
Chapter 01 user exitsChapter 01 user exits
Chapter 01 user exits
 
Sap abap
Sap abapSap abap
Sap abap
 
Enhancement framework the new way to enhance your abap systems
Enhancement framework   the new way to enhance your abap systemsEnhancement framework   the new way to enhance your abap systems
Enhancement framework the new way to enhance your abap systems
 
sap script overview
sap script overviewsap script overview
sap script overview
 
Chapter 02 sap script forms
Chapter 02 sap script formsChapter 02 sap script forms
Chapter 02 sap script forms
 
BATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONBATCH DATA COMMUNICATION
BATCH DATA COMMUNICATION
 
Sap sapscripts tips and tricks
Sap sapscripts tips and tricksSap sapscripts tips and tricks
Sap sapscripts tips and tricks
 
Abap reports
Abap reportsAbap reports
Abap reports
 
Abap proxies
Abap proxiesAbap proxies
Abap proxies
 
Sap fiori tutorial
Sap fiori tutorialSap fiori tutorial
Sap fiori tutorial
 
Introduction to extracting data from sap s 4 hana with abap cds views
Introduction to extracting data from sap s 4 hana with abap cds viewsIntroduction to extracting data from sap s 4 hana with abap cds views
Introduction to extracting data from sap s 4 hana with abap cds views
 
Abap Objects for BW
Abap Objects for BWAbap Objects for BW
Abap Objects for BW
 
SAP S_4HANA Migration Cockpit - Migrate your Data to SAP S_4HANA.pdf
SAP S_4HANA Migration Cockpit - Migrate your Data to SAP S_4HANA.pdfSAP S_4HANA Migration Cockpit - Migrate your Data to SAP S_4HANA.pdf
SAP S_4HANA Migration Cockpit - Migrate your Data to SAP S_4HANA.pdf
 
Sap Abap Reports
Sap Abap ReportsSap Abap Reports
Sap Abap Reports
 
Introducing enhancement framework.doc
Introducing enhancement framework.docIntroducing enhancement framework.doc
Introducing enhancement framework.doc
 
HANA Modeling
HANA Modeling HANA Modeling
HANA Modeling
 
Sap abap
Sap abapSap abap
Sap abap
 
Sap User Exit for Functional Consultant
Sap User Exit for Functional ConsultantSap User Exit for Functional Consultant
Sap User Exit for Functional Consultant
 
SAP Document Management System Integration with Content Servers
SAP Document Management System Integration with Content Servers SAP Document Management System Integration with Content Servers
SAP Document Management System Integration with Content Servers
 
Smartforms interview questions with answers
Smartforms interview questions with answersSmartforms interview questions with answers
Smartforms interview questions with answers
 

Ähnlich wie Technical Overview of CDS View - SAP HANA Part II

Ado dot net complete meterial (1)
Ado dot net complete meterial (1)Ado dot net complete meterial (1)
Ado dot net complete meterial (1)
Mubarak Hussain
 
Introduction to sql server
Introduction to sql serverIntroduction to sql server
Introduction to sql server
Vinay Thota
 
System i - DDL vs DDS Presentation
System i - DDL vs DDS PresentationSystem i - DDL vs DDS Presentation
System i - DDL vs DDS Presentation
Chuck Walker
 
CA_Plex_SupportForModernizingIBM_DB2_for_i
CA_Plex_SupportForModernizingIBM_DB2_for_iCA_Plex_SupportForModernizingIBM_DB2_for_i
CA_Plex_SupportForModernizingIBM_DB2_for_i
George Jeffcock
 
Utilized Code Gen To Save Our Efforts In Sap Integration
Utilized Code Gen To Save Our Efforts In Sap IntegrationUtilized Code Gen To Save Our Efforts In Sap Integration
Utilized Code Gen To Save Our Efforts In Sap Integration
Guo Albert
 

Ähnlich wie Technical Overview of CDS View - SAP HANA Part II (20)

PATTERNS07 - Data Representation in C#
PATTERNS07 - Data Representation in C#PATTERNS07 - Data Representation in C#
PATTERNS07 - Data Representation in C#
 
PPT temp.pptx
PPT temp.pptxPPT temp.pptx
PPT temp.pptx
 
Azure data factory security
Azure data factory securityAzure data factory security
Azure data factory security
 
RDBMS to NoSQL: Practical Advice from Successful Migrations
RDBMS to NoSQL: Practical Advice from Successful MigrationsRDBMS to NoSQL: Practical Advice from Successful Migrations
RDBMS to NoSQL: Practical Advice from Successful Migrations
 
Schema webinar
Schema webinarSchema webinar
Schema webinar
 
Sql good practices
Sql good practicesSql good practices
Sql good practices
 
Ado dot net complete meterial (1)
Ado dot net complete meterial (1)Ado dot net complete meterial (1)
Ado dot net complete meterial (1)
 
Pandas vs. SQL – Tools that Data Scientists use most often.pdf
Pandas vs. SQL – Tools that Data Scientists use most often.pdfPandas vs. SQL – Tools that Data Scientists use most often.pdf
Pandas vs. SQL – Tools that Data Scientists use most often.pdf
 
Introduction to ado.net
Introduction to ado.netIntroduction to ado.net
Introduction to ado.net
 
SQL vs NoSQL deep dive
SQL vs NoSQL deep diveSQL vs NoSQL deep dive
SQL vs NoSQL deep dive
 
黑豹 ch4 ddd pattern practice (2)
黑豹 ch4 ddd pattern practice (2)黑豹 ch4 ddd pattern practice (2)
黑豹 ch4 ddd pattern practice (2)
 
Introduction to sql server
Introduction to sql serverIntroduction to sql server
Introduction to sql server
 
OBIEE publisher with Report creation - Tutorial
OBIEE publisher with Report creation - TutorialOBIEE publisher with Report creation - Tutorial
OBIEE publisher with Report creation - Tutorial
 
System i - DDL vs DDS Presentation
System i - DDL vs DDS PresentationSystem i - DDL vs DDS Presentation
System i - DDL vs DDS Presentation
 
CA_Plex_SupportForModernizingIBM_DB2_for_i
CA_Plex_SupportForModernizingIBM_DB2_for_iCA_Plex_SupportForModernizingIBM_DB2_for_i
CA_Plex_SupportForModernizingIBM_DB2_for_i
 
SQL Server Denali: BI on Your Terms
SQL Server Denali: BI on Your Terms SQL Server Denali: BI on Your Terms
SQL Server Denali: BI on Your Terms
 
Graph db as metastore
Graph db as metastoreGraph db as metastore
Graph db as metastore
 
Utilized Code Gen To Save Our Efforts In Sap Integration
Utilized Code Gen To Save Our Efforts In Sap IntegrationUtilized Code Gen To Save Our Efforts In Sap Integration
Utilized Code Gen To Save Our Efforts In Sap Integration
 
Oracle to Amazon Aurora Migration, Step by Step - AWS Online Tech Talks
Oracle to Amazon Aurora Migration, Step by Step - AWS Online Tech TalksOracle to Amazon Aurora Migration, Step by Step - AWS Online Tech Talks
Oracle to Amazon Aurora Migration, Step by Step - AWS Online Tech Talks
 
BI Publisher Data model design document
BI Publisher Data model design documentBI Publisher Data model design document
BI Publisher Data model design document
 

Mehr von Ashish Saxena

CRM in S/4HANA: Roadmap, Architecture and Business Process
CRM in S/4HANA: Roadmap, Architecture and Business ProcessCRM in S/4HANA: Roadmap, Architecture and Business Process
CRM in S/4HANA: Roadmap, Architecture and Business Process
Ashish Saxena
 

Mehr von Ashish Saxena (20)

Changing Business Models: The Shift to B2B2C and D2C Sales
Changing Business Models: The Shift to B2B2C and D2C SalesChanging Business Models: The Shift to B2B2C and D2C Sales
Changing Business Models: The Shift to B2B2C and D2C Sales
 
SAP Field Service Management -Planning & Dispatching
SAP Field Service Management -Planning & DispatchingSAP Field Service Management -Planning & Dispatching
SAP Field Service Management -Planning & Dispatching
 
Smart Railways Predicative Maintenance of Door Subsystem
Smart Railways Predicative Maintenance of Door SubsystemSmart Railways Predicative Maintenance of Door Subsystem
Smart Railways Predicative Maintenance of Door Subsystem
 
Intelligent Sales Execution with SAP Sales Cloud for Smarter and Faster Sales
Intelligent Sales Execution with SAP Sales Cloud for Smarter and Faster SalesIntelligent Sales Execution with SAP Sales Cloud for Smarter and Faster Sales
Intelligent Sales Execution with SAP Sales Cloud for Smarter and Faster Sales
 
Benefit and Enablers of Deploying IoT Solution
Benefit and Enablers of Deploying IoT SolutionBenefit and Enablers of Deploying IoT Solution
Benefit and Enablers of Deploying IoT Solution
 
How to Achieve Operational Excellence in Enterprise Asset Management?
How to Achieve Operational Excellence in Enterprise Asset Management?How to Achieve Operational Excellence in Enterprise Asset Management?
How to Achieve Operational Excellence in Enterprise Asset Management?
 
Trends and Benefits of Implementing E-Commerce for B2B Companies
Trends and Benefits of Implementing  E-Commerce for B2B Companies Trends and Benefits of Implementing  E-Commerce for B2B Companies
Trends and Benefits of Implementing E-Commerce for B2B Companies
 
Smart Fleet Management with IoT
Smart Fleet Management with IoTSmart Fleet Management with IoT
Smart Fleet Management with IoT
 
SMART PUMPS NEW BUSINESS MODELS WITH IoT (INTERNT OF THINGS)
SMART PUMPS  NEW BUSINESS MODELS WITH IoT (INTERNT OF THINGS)SMART PUMPS  NEW BUSINESS MODELS WITH IoT (INTERNT OF THINGS)
SMART PUMPS NEW BUSINESS MODELS WITH IoT (INTERNT OF THINGS)
 
Reinvent Your Business With Enterprise Asset Management
Reinvent Your Business With Enterprise Asset ManagementReinvent Your Business With Enterprise Asset Management
Reinvent Your Business With Enterprise Asset Management
 
Delivered a SAP EAM/Field Service solution for Construction and Mining Equipm...
Delivered a SAP EAM/Field Service solution for Construction and Mining Equipm...Delivered a SAP EAM/Field Service solution for Construction and Mining Equipm...
Delivered a SAP EAM/Field Service solution for Construction and Mining Equipm...
 
SAP PI/PO FAQ’s
SAP PI/PO FAQ’sSAP PI/PO FAQ’s
SAP PI/PO FAQ’s
 
SAP C/4HANA FAQ's
SAP C/4HANA FAQ'sSAP C/4HANA FAQ's
SAP C/4HANA FAQ's
 
SAP ODATA Overview & Guidelines
SAP ODATA Overview & GuidelinesSAP ODATA Overview & Guidelines
SAP ODATA Overview & Guidelines
 
CRM in S/4HANA: Roadmap, Architecture and Business Process
CRM in S/4HANA: Roadmap, Architecture and Business ProcessCRM in S/4HANA: Roadmap, Architecture and Business Process
CRM in S/4HANA: Roadmap, Architecture and Business Process
 
SAP S/4HANA FAQ’s
SAP S/4HANA FAQ’sSAP S/4HANA FAQ’s
SAP S/4HANA FAQ’s
 
Migrate Custom data/object in SAP S/4 HANA
Migrate Custom data/object in SAP S/4 HANA Migrate Custom data/object in SAP S/4 HANA
Migrate Custom data/object in SAP S/4 HANA
 
Sales Enablement for a High-tech Manufacturer
Sales Enablement for a High-tech Manufacturer Sales Enablement for a High-tech Manufacturer
Sales Enablement for a High-tech Manufacturer
 
Reimagine Service Delivery using IoT and AI
Reimagine Service Delivery using IoT and AIReimagine Service Delivery using IoT and AI
Reimagine Service Delivery using IoT and AI
 
How to Improve Customer Lifetime Value (CLV) using SAP Billing (BRIM/Hybris B...
How to Improve Customer Lifetime Value (CLV) using SAP Billing (BRIM/Hybris B...How to Improve Customer Lifetime Value (CLV) using SAP Billing (BRIM/Hybris B...
How to Improve Customer Lifetime Value (CLV) using SAP Billing (BRIM/Hybris B...
 

Kürzlich hochgeladen

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Kürzlich hochgeladen (20)

Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 

Technical Overview of CDS View - SAP HANA Part II

  • 1. In the first Blog, we covered how SAP introduced a new data modeling infrastructure in the form of Core Data Services and how a CDS view is different from SE11 view. The focus of this blog will be entirely on the steps involved in creating CDS View using Eclipse, on different types of CDS views, and on how to use CDS view in ABAP program. It is very important that a developer understands that technically, CDS is an enhancement of SQL which provides a Data Definition Language (DDL) for defining semantically rich database tables/views (CDS entities) and user-defined types in the database. Unlike the SAP HANA CDS, ABAP CDS are independent of the database system. The entities of the models defined in ABAP CDS provide enhanced access functions compared with existing database tables and views defined in ABAP Dictionary, making it possible to optimize Open SQL-based applications. And it is because of these unparalleled advantages that ABAP CDS is the most preferred form of methodology when it comes to Code to Data paradigm. DDL and CDS view Entity When creating a CDS view in ADT tool, 2 entities get created. 1. DDL SQL view: DDL SQL view is read-only classical database view (SE 11 view) which is visible in ABAP data dictionary(SE11). 2. CDS view entity: CDS view entity is a DDL source file and the actual CDS view. It is a database object which is visible in ADT tool. This is not visible in SE11. Following points should be considered for DDL SQL view and CDS view entity: 1. SQL view and CDS view entity can have the same name but should be kept differently. 2. SQL view can be viewed in SE11 but it is not editable there whereas CDS view entity is not available in SE11. 3. CDS view entity is used as a data type in ABAP program and as data source in open SQL. SQL view can be used in a similar way, but it behaves like a classical SE11 view. 4. CDS view entity can be deleted. Both SQL view and CDS view are deleted together. Steps to create CDS view: 1. Download Eclipse and ADT plugin First, prepare development environment for CDS view. Eclipse is a tool where a user creates ABAP developments on HANA. Before downloading eclipse, ensure that JRE and SAP GUI are available on system. Blog Technical Overview of CDS View for ABAPer - Part II By Rashmi Bansal, Accrete Solutions Once Eclipse has been installed, open it by a double-click on its icon. Now, get ADT plugin to connect with ABAP backend system. Go to HELP-> Install new software. Click on the ADD button, give a name to plugin and location as a site (https://tools.hana.ondemand.com/oxygen) Click on next, accept terms and agreement, finish this process. Wait for 2-3 minutes, Eclipse will ask for a restart for itself. After restarting eclipse, click on the workbench icon. Choose ‘ABAP Development tools for SAP Netweaver’ 2. Create ABAP project Go to file->new->project->ABAP project.
  • 2. Click on next. Enter system information. Click on next. Give a name of CDS view. Click on next button. Enter username and password. Click on next. It will ask for the project name. Enter the project name and finish this process. Choose ABAP perspective. The project will be available with folder Local objects($tmp). 3. Create CDS view Right click on local object folder. Go to new->other ABAP repository objects->core data services->Data definition or search for DDL source. Click on next. Next screen would ask for a transport request, assign a new name to it. Click on next. Here it will ask to choose one template for CDS view. There are 5 options available, I have chosen the 1st option. Click on finish. It will open CDS view in source code editor where provide a name for DDL SQL view i.e. visible in SE11 and data source name(table name). Notice how the description and CDS view name is already assigned here. Below example is a display of material information from MARA table. Save and activate view. Run as ABAP objects. In the above example, CDS view ZCDS_SQL_MAT1 is visible in SE11. But view ZCDS_MATERIAL is not available in SE11.
  • 3. CDS view with parameters With this developer can pass parameters to CDS views which can be used in where clause of a select query. For example, if it is required to fetch material data for a plant then pass plant as parameters. You need to use ‘$parameters’ with parameter’s name. CDS view with Joins When it is required to fetch data from multiple tables, use joins. CDS supports inner join, left/outer join and cross joins. There is no limit on the number of join expressions in a SELECT statement of a CDS view in the DDL, but there is an ATC check that produces a message once a specific number of expressions is reached. In nested join expressions, parentheses are recommended for making the code easier to read. In the case of inner and outer joins, the parentheses can be specified wherever the ON conditions specify parentheses implicitly. Below is an example of CDS view with joins and parameters where order type and plant number is passed as a parameter to fetch all order numbers, order status, material number and serial number information where material type is ‘finished goods' and movement type is ‘261’. CDS view with Associations Associations allow us to replace joins with simple path expressions in queries. Association is basically not a join as such, it is just metadata about possible join connections. It’s Join on Demand. Actual join is created when the association is used in a path expression. To understand how the association works, have a look in below CDS view where a CDS view with the association on table MARA, MAKT is created. The above CDS, when executed, will give the below output. It means no joins have taken place in association on table MARA and MAKT. This association will work when it is specifically called in path expression in the select query. Find below example where CDS view is called in select query and association is also called in select query path expression.
  • 4. For all enquiries please contact at : corpinfo@accretesol.com , Tel : +1(877)-849-5838 Visit us at : Accrete Solutions USA Head Office 3350 Scott Blvd, Bldg 34 Santa Clara, CA 95054 South Africa 609 Lanseria Corporate Estate, Falcon Lane, Lanseria, Gauteng Chile Galvarino Gallardo 1638, Providencia, Santiago India Development Centre 102A, HARTRON, Electronics City, Gurgaon Copyright © Accrete Solutions 2018. All rights reserved. By default, association gets converted into the left outer join. To make association as an inner join, specify it as view itself. In association, cardinality shows a minimum and a maximum number of records, it does not show one to one or one to many relations. In a nutshell To summarize, an ABAP CDS, because of its abstract data modeling techniques, is much more significant compared to the options that were available earlier in the data dictionary. The different types of ABAP CDS provide the whole plethora of using this abstract data modeling techniques thereby making it possible to write easier yet semantically enriched data models for different kinds of applications, for example, search applications, analytical applications, and transactional applications. The application logic is moved from the application server to the database server ("code push down") and the data is processed where it is saved, thereby improving the performance. In next blog, we will discuss CDS with Join Vs CDS with Association