SlideShare a Scribd company logo
1 of 25
SAP HANA on
Technical Level
Table of Contents
SAP HANA
What is Code-To-Data?
Where does Code push down start?
Open SQL
Open SQL: Extended Features
Core Data Service(CDS)
ABAP Managed Database Procedure
Code-To-Data
 Key difference for developing applications in ABAP for
HANA is to push down data intensive calculation to the HANA
DB layer
Processing of data is done at DB layer, instead of bringing
data to the ABAP Layer and then doing computation
 This is what termed as Code-to-Data paradigm
Where does Code push down starts?
 General misconception about it i.e. to use either HANA native
SQL or build complex HANA artefacts.
 SAP provides a few ways to implement ‘code pushdown’
approach which are as follows:
 Open SQL
 CDS Views
 ABAP Managed Data Procedures(AMDP)
1. Open SQL
 Allows developers to perform database operation on
traditional DB, regardless underlying RDBMS
 Open SQL written in program is converted by the kernel into
Native SQL and then executed on actual RDBMS
 In order to make use the advanced feature of Open SQL one
needs to accommodate minor change as shown on next
slide
Open SQL
 As shown in above code snippet the changes are the following in
terms of syntax
 The column list needs to be separated by commas
 The host variable used within the open SQL statement needs to be
escaped by an “@” symbol.
Open SQL : Extended Features
 Support for arithmetic and string expression and computed
columns in the projection list.
 Literals
 Operators: +,-,*,/, etc,
 Built in function e.g. CONCAT ,Substrings etc.
 CAST and CASE expression
 Specially built-in functions:
 Currency and unit conversion
 COALESCE
Ways of achieving Code push Down using open
SQL
 Use aggregate function where relevant
 Use arithmetic and string expression within Open SQL statements
 Use computed columns in order to push down computation
 Use CASE and/or IF….ENDIF expression within open SQL in order
to embed the logic of conditional expression
Open SQL
2. Core Data Services(CDS)
 It is data modeling infrastructure for defining & consuming
semantic & re-usable data models on database
 SQL like language ,provides an open source Data Definition
Language for creation of Database artefacts
 CDS can be used to create tables , views, data types,
 CDS views, are in many ways similar to standard view that
would be defined in se11
 Main difference that CDS view resides on the HANA DB itself
therefore can be consume by non-ABAP application also
 Can only be created in Eclipse(by utilizing ADT) and not in SAP
GUI
CDS view
Annotation
Terminology related to CDS view
 Annotations: The term Annotation implies attaching data to
another piece of data
 Generally used annotations are as follows:
 AbapCatalog.sqlViewName: Name of the CDS Database View
 AbapCatalog.compiler.compareFilter – Defines the evaluations of filter condition in path
expression of the CDS view
 EndUserText.label : Translatable short text of the CDS view
 AccessControl.authorizationCheck : Defines the implicit access control when Open SQL is
used to access
 Each active ABAP CDS view has corresponding ABAP dictionary
view and database view. These corresponding objects are
managed automatically by the ABAP system when activating
DDL source.
CDS View with parameter
 CDS view with parameter execution through SE11 is not yet supported
 To use CDS view with parameter we need to consume this view directly in
class or ABAP report
 E.g. Use of above CDS view ( Z_CDSVIEW_VBRK) in report
Z_TEST_HANA_CDSVIEW1
CDS view without parameter
Joins in CDS view
 Inner Join or Just Join – Selects all entries in both tables which meet ON
condition
Left Outer Join
 Left Outer Join – Selects all record from the left table matching with the right table
which meet ON condition. If no record found in second table those record fields are
null
Right Outer Join
Right Outer Join - Selects all records from right table matching with left table which
meet ON condition . If no records are found in left table those record fields are null
Full Outer Join
 The FULL JOIN keyword returns all the rows from the left table ,and all the
rows from the right table
 If there are rows in the left table that do not have matches in right table or if
there are rows in right table that do not have matches in left table , those
rows will be listed as well
 Conceptual Entity
3. ABAP Managed Database Procedure
 AMDP are specialized ABAP methods that allow the creation of
database procedure written in DB specific language
 The basic idea of AMDP is to manage HANA procedure and their
lifecycle inside the ABAP server.
 To use AMDP with HANA, the developer would create a method
written in SQLscript that could be directly executed upon in the
database layer
 Classes that implement AMDP methods are required to
implement specific interface (In case of HANA it is
IF_AMDP_MARKER_HDB)
ABAP Managed Database Procedure
 The method that actually implements the SQLscript would then
need to specify it’s purpose with specific addition . An example
ABAP managed Database
 BY DATABASE PROCEDURE - Identify this method as AMDP
 FOR HDB – The HDB part identifies this is procedure for HANA.
 LANGUAGE SQLSCRIPT - This identifies the language that will be
used within the method . SQLSCRIPT is the language that the
HANA DB uses, and is the language that must be used with the
AMDP method.
 USING xxxxx – Any code within the AMDP method has no
knowledge of any DDIC types. To specify the use of a table OR a
view , you need to call out the tables that will be used as the
part of the method header (where XXX is Table OR view name)
ABAP Managed Database Procedure
 AMDP allows developers to create and manage stored
procedures directly in ABAP, while they are executed at
database level
 Though the AMDPs are defined on the ABAP level, they are by
nature dependent on the underlying database platform, so that
they can fully optimize the database in use
 The implementation language for the AMDP varies according to
the Database in use, For SAP HANA it is SQLscript.
ABAP Managed Database Procedure
AMDP Restrictions
 RETURNING parameters cannot be used
 Parameters have to be passed by VALUE
 Parameters can only be either Table OR Scalar . That means ,only
variables, structures and simple internal tables can be passed .
No deep structure , no complex tables( i.e. Nested Tables)
 IF ABAP dictionary structures are used for typing ,the method
cannot be implemented as an AMDP
 Whatever Dictionary tables, views ,other procedures etc you
want to use in AMDP methods has to be declared while
implementing using keyword USING
Thank you!

More Related Content

What's hot

SITIST 2015 Dev - Abap on Hana
SITIST 2015 Dev - Abap on HanaSITIST 2015 Dev - Abap on Hana
SITIST 2015 Dev - Abap on Hanasitist
 
OData service from ABAP CDS
OData service from ABAP CDSOData service from ABAP CDS
OData service from ABAP CDSAnil Dasari
 
What's new for Text in SAP HANA SPS 11
What's new for Text in SAP HANA SPS 11What's new for Text in SAP HANA SPS 11
What's new for Text in SAP HANA SPS 11SAP Technology
 
HANA SPS07 Extended Application Service
HANA SPS07 Extended Application ServiceHANA SPS07 Extended Application Service
HANA SPS07 Extended Application ServiceSAP Technology
 
SAP HANA SPS10- SAP HANA Development Tools
SAP HANA SPS10- SAP HANA Development ToolsSAP HANA SPS10- SAP HANA Development Tools
SAP HANA SPS10- SAP HANA Development ToolsSAP Technology
 
Enhancing data sources with badi in SAP ABAP
Enhancing data sources with badi in SAP ABAPEnhancing data sources with badi in SAP ABAP
Enhancing data sources with badi in SAP ABAPAabid Khan
 
Analytics & Fiori with the Analysis Path Framework
Analytics & Fiori with the Analysis Path FrameworkAnalytics & Fiori with the Analysis Path Framework
Analytics & Fiori with the Analysis Path FrameworkTobias Trapp
 
SAP HANA SPS10- Extended Application Services (XS) Programming Model
SAP HANA SPS10- Extended Application Services (XS) Programming ModelSAP HANA SPS10- Extended Application Services (XS) Programming Model
SAP HANA SPS10- Extended Application Services (XS) Programming ModelSAP Technology
 
SAP HANA Native Application Development
SAP HANA Native Application DevelopmentSAP HANA Native Application Development
SAP HANA Native Application DevelopmentDickinson + Associates
 
HANA SPS07 Smart Data Access
HANA SPS07 Smart Data AccessHANA SPS07 Smart Data Access
HANA SPS07 Smart Data AccessSAP Technology
 
SAP HANA SPS10- Text Analysis & Text Mining
SAP HANA SPS10- Text Analysis & Text MiningSAP HANA SPS10- Text Analysis & Text Mining
SAP HANA SPS10- Text Analysis & Text MiningSAP Technology
 
The S/4 HANA Programing Paradigm
The S/4 HANA Programing ParadigmThe S/4 HANA Programing Paradigm
The S/4 HANA Programing Paradigmmsg systems Romania
 
Sap hana studio_overview
Sap hana studio_overviewSap hana studio_overview
Sap hana studio_overviewArun Singhania
 

What's hot (18)

SITIST 2015 Dev - Abap on Hana
SITIST 2015 Dev - Abap on HanaSITIST 2015 Dev - Abap on Hana
SITIST 2015 Dev - Abap on Hana
 
OData service from ABAP CDS
OData service from ABAP CDSOData service from ABAP CDS
OData service from ABAP CDS
 
What's new for Text in SAP HANA SPS 11
What's new for Text in SAP HANA SPS 11What's new for Text in SAP HANA SPS 11
What's new for Text in SAP HANA SPS 11
 
HANA SPS07 Extended Application Service
HANA SPS07 Extended Application ServiceHANA SPS07 Extended Application Service
HANA SPS07 Extended Application Service
 
SAP HANA SPS10- SAP HANA Development Tools
SAP HANA SPS10- SAP HANA Development ToolsSAP HANA SPS10- SAP HANA Development Tools
SAP HANA SPS10- SAP HANA Development Tools
 
Enhancing data sources with badi in SAP ABAP
Enhancing data sources with badi in SAP ABAPEnhancing data sources with badi in SAP ABAP
Enhancing data sources with badi in SAP ABAP
 
Analytics & Fiori with the Analysis Path Framework
Analytics & Fiori with the Analysis Path FrameworkAnalytics & Fiori with the Analysis Path Framework
Analytics & Fiori with the Analysis Path Framework
 
Dev207 berlin
Dev207 berlinDev207 berlin
Dev207 berlin
 
Sap abap on hana
Sap abap on hanaSap abap on hana
Sap abap on hana
 
SAP HANA SPS10- Extended Application Services (XS) Programming Model
SAP HANA SPS10- Extended Application Services (XS) Programming ModelSAP HANA SPS10- Extended Application Services (XS) Programming Model
SAP HANA SPS10- Extended Application Services (XS) Programming Model
 
SAP HANA Native Application Development
SAP HANA Native Application DevelopmentSAP HANA Native Application Development
SAP HANA Native Application Development
 
SAP Hana Overview
SAP Hana OverviewSAP Hana Overview
SAP Hana Overview
 
HANA SPS07 Smart Data Access
HANA SPS07 Smart Data AccessHANA SPS07 Smart Data Access
HANA SPS07 Smart Data Access
 
HANA Modeling
HANA Modeling HANA Modeling
HANA Modeling
 
New course content hana sps10 1
New course content hana sps10 1New course content hana sps10 1
New course content hana sps10 1
 
SAP HANA SPS10- Text Analysis & Text Mining
SAP HANA SPS10- Text Analysis & Text MiningSAP HANA SPS10- Text Analysis & Text Mining
SAP HANA SPS10- Text Analysis & Text Mining
 
The S/4 HANA Programing Paradigm
The S/4 HANA Programing ParadigmThe S/4 HANA Programing Paradigm
The S/4 HANA Programing Paradigm
 
Sap hana studio_overview
Sap hana studio_overviewSap hana studio_overview
Sap hana studio_overview
 

Similar to Sap hana on technical level By Yogesh Gupte

SAP ABAP Latest Interview Questions
SAP ABAP Latest  Interview Questions SAP ABAP Latest  Interview Questions
SAP ABAP Latest Interview Questions piyushchawala
 
500+ SAP ABAP INTERVIEW QUESTIONS WITH ANSWERS
500+ SAP ABAP INTERVIEW QUESTIONS WITH ANSWERS500+ SAP ABAP INTERVIEW QUESTIONS WITH ANSWERS
500+ SAP ABAP INTERVIEW QUESTIONS WITH ANSWERSIICT Chromepet
 
SAP ABAP Interview questions
SAP ABAP Interview questionsSAP ABAP Interview questions
SAP ABAP Interview questionsIT LearnMore
 
Z abap coding_standards_v2_0_t
Z abap coding_standards_v2_0_tZ abap coding_standards_v2_0_t
Z abap coding_standards_v2_0_tRasika Jayawardana
 
Abap sample code
Abap sample codeAbap sample code
Abap sample coderoymat2
 
Abap sample programs 24 slides
Abap sample programs 24 slidesAbap sample programs 24 slides
Abap sample programs 24 slidesRoy Mathew
 
ABAP Coding Standards Reference Guide
ABAP Coding Standards Reference GuideABAP Coding Standards Reference Guide
ABAP Coding Standards Reference GuideStacy Taylor
 
Db2 sql tuning and bmc catalog manager
Db2 sql tuning and bmc catalog manager Db2 sql tuning and bmc catalog manager
Db2 sql tuning and bmc catalog manager Krishan Singh
 
Abap interview questions and answers
Abap interview questions and answersAbap interview questions and answers
Abap interview questions and answersKaustav Pyne
 
Programming Interface & SAP BDC
Programming Interface & SAP BDCProgramming Interface & SAP BDC
Programming Interface & SAP BDCSyam Sasi
 
Top sap technology trends of 2016
Top sap technology trends of 2016Top sap technology trends of 2016
Top sap technology trends of 2016jaba shree
 

Similar to Sap hana on technical level By Yogesh Gupte (20)

CDS Views.pptx
CDS Views.pptxCDS Views.pptx
CDS Views.pptx
 
SAP ABAP Latest Interview Questions
SAP ABAP Latest  Interview Questions SAP ABAP Latest  Interview Questions
SAP ABAP Latest Interview Questions
 
500+ SAP ABAP INTERVIEW QUESTIONS WITH ANSWERS
500+ SAP ABAP INTERVIEW QUESTIONS WITH ANSWERS500+ SAP ABAP INTERVIEW QUESTIONS WITH ANSWERS
500+ SAP ABAP INTERVIEW QUESTIONS WITH ANSWERS
 
SAP ABAP Interview questions
SAP ABAP Interview questionsSAP ABAP Interview questions
SAP ABAP Interview questions
 
Sap architecture
Sap architectureSap architecture
Sap architecture
 
Z abap coding_standards_v2_0_t
Z abap coding_standards_v2_0_tZ abap coding_standards_v2_0_t
Z abap coding_standards_v2_0_t
 
Abap sample code
Abap sample codeAbap sample code
Abap sample code
 
Abap sample programs 24 slides
Abap sample programs 24 slidesAbap sample programs 24 slides
Abap sample programs 24 slides
 
Abap sample
Abap sampleAbap sample
Abap sample
 
Abap start
Abap startAbap start
Abap start
 
ABAP Coding Standards Reference Guide
ABAP Coding Standards Reference GuideABAP Coding Standards Reference Guide
ABAP Coding Standards Reference Guide
 
Abap training material
Abap training material Abap training material
Abap training material
 
Cool features 7.4
Cool features 7.4Cool features 7.4
Cool features 7.4
 
Abap for sd consultatnt
Abap for sd consultatntAbap for sd consultatnt
Abap for sd consultatnt
 
Db2 sql tuning and bmc catalog manager
Db2 sql tuning and bmc catalog manager Db2 sql tuning and bmc catalog manager
Db2 sql tuning and bmc catalog manager
 
Abap interview questions and answers
Abap interview questions and answersAbap interview questions and answers
Abap interview questions and answers
 
Programming Interface & SAP BDC
Programming Interface & SAP BDCProgramming Interface & SAP BDC
Programming Interface & SAP BDC
 
Top sap technology trends of 2016
Top sap technology trends of 2016Top sap technology trends of 2016
Top sap technology trends of 2016
 
1000 sap-interview-qa
1000 sap-interview-qa1000 sap-interview-qa
1000 sap-interview-qa
 
SAP Reuse Tools
SAP Reuse Tools SAP Reuse Tools
SAP Reuse Tools
 

Recently uploaded

Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxnada99848
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 

Recently uploaded (20)

Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptx
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 

Sap hana on technical level By Yogesh Gupte

  • 2. Table of Contents SAP HANA What is Code-To-Data? Where does Code push down start? Open SQL Open SQL: Extended Features Core Data Service(CDS) ABAP Managed Database Procedure
  • 3. Code-To-Data  Key difference for developing applications in ABAP for HANA is to push down data intensive calculation to the HANA DB layer Processing of data is done at DB layer, instead of bringing data to the ABAP Layer and then doing computation  This is what termed as Code-to-Data paradigm
  • 4. Where does Code push down starts?  General misconception about it i.e. to use either HANA native SQL or build complex HANA artefacts.  SAP provides a few ways to implement ‘code pushdown’ approach which are as follows:  Open SQL  CDS Views  ABAP Managed Data Procedures(AMDP)
  • 5. 1. Open SQL  Allows developers to perform database operation on traditional DB, regardless underlying RDBMS  Open SQL written in program is converted by the kernel into Native SQL and then executed on actual RDBMS  In order to make use the advanced feature of Open SQL one needs to accommodate minor change as shown on next slide
  • 6. Open SQL  As shown in above code snippet the changes are the following in terms of syntax  The column list needs to be separated by commas  The host variable used within the open SQL statement needs to be escaped by an “@” symbol.
  • 7. Open SQL : Extended Features  Support for arithmetic and string expression and computed columns in the projection list.  Literals  Operators: +,-,*,/, etc,  Built in function e.g. CONCAT ,Substrings etc.  CAST and CASE expression  Specially built-in functions:  Currency and unit conversion  COALESCE
  • 8. Ways of achieving Code push Down using open SQL  Use aggregate function where relevant  Use arithmetic and string expression within Open SQL statements  Use computed columns in order to push down computation  Use CASE and/or IF….ENDIF expression within open SQL in order to embed the logic of conditional expression
  • 10. 2. Core Data Services(CDS)  It is data modeling infrastructure for defining & consuming semantic & re-usable data models on database  SQL like language ,provides an open source Data Definition Language for creation of Database artefacts  CDS can be used to create tables , views, data types,  CDS views, are in many ways similar to standard view that would be defined in se11  Main difference that CDS view resides on the HANA DB itself therefore can be consume by non-ABAP application also  Can only be created in Eclipse(by utilizing ADT) and not in SAP GUI
  • 12. Terminology related to CDS view  Annotations: The term Annotation implies attaching data to another piece of data  Generally used annotations are as follows:  AbapCatalog.sqlViewName: Name of the CDS Database View  AbapCatalog.compiler.compareFilter – Defines the evaluations of filter condition in path expression of the CDS view  EndUserText.label : Translatable short text of the CDS view  AccessControl.authorizationCheck : Defines the implicit access control when Open SQL is used to access  Each active ABAP CDS view has corresponding ABAP dictionary view and database view. These corresponding objects are managed automatically by the ABAP system when activating DDL source.
  • 13. CDS View with parameter  CDS view with parameter execution through SE11 is not yet supported  To use CDS view with parameter we need to consume this view directly in class or ABAP report  E.g. Use of above CDS view ( Z_CDSVIEW_VBRK) in report Z_TEST_HANA_CDSVIEW1
  • 14. CDS view without parameter
  • 15. Joins in CDS view  Inner Join or Just Join – Selects all entries in both tables which meet ON condition
  • 16. Left Outer Join  Left Outer Join – Selects all record from the left table matching with the right table which meet ON condition. If no record found in second table those record fields are null
  • 17. Right Outer Join Right Outer Join - Selects all records from right table matching with left table which meet ON condition . If no records are found in left table those record fields are null
  • 18. Full Outer Join  The FULL JOIN keyword returns all the rows from the left table ,and all the rows from the right table  If there are rows in the left table that do not have matches in right table or if there are rows in right table that do not have matches in left table , those rows will be listed as well  Conceptual Entity
  • 19. 3. ABAP Managed Database Procedure  AMDP are specialized ABAP methods that allow the creation of database procedure written in DB specific language  The basic idea of AMDP is to manage HANA procedure and their lifecycle inside the ABAP server.  To use AMDP with HANA, the developer would create a method written in SQLscript that could be directly executed upon in the database layer  Classes that implement AMDP methods are required to implement specific interface (In case of HANA it is IF_AMDP_MARKER_HDB)
  • 20. ABAP Managed Database Procedure  The method that actually implements the SQLscript would then need to specify it’s purpose with specific addition . An example
  • 21. ABAP managed Database  BY DATABASE PROCEDURE - Identify this method as AMDP  FOR HDB – The HDB part identifies this is procedure for HANA.  LANGUAGE SQLSCRIPT - This identifies the language that will be used within the method . SQLSCRIPT is the language that the HANA DB uses, and is the language that must be used with the AMDP method.  USING xxxxx – Any code within the AMDP method has no knowledge of any DDIC types. To specify the use of a table OR a view , you need to call out the tables that will be used as the part of the method header (where XXX is Table OR view name)
  • 22. ABAP Managed Database Procedure  AMDP allows developers to create and manage stored procedures directly in ABAP, while they are executed at database level  Though the AMDPs are defined on the ABAP level, they are by nature dependent on the underlying database platform, so that they can fully optimize the database in use  The implementation language for the AMDP varies according to the Database in use, For SAP HANA it is SQLscript.
  • 24. AMDP Restrictions  RETURNING parameters cannot be used  Parameters have to be passed by VALUE  Parameters can only be either Table OR Scalar . That means ,only variables, structures and simple internal tables can be passed . No deep structure , no complex tables( i.e. Nested Tables)  IF ABAP dictionary structures are used for typing ,the method cannot be implemented as an AMDP  Whatever Dictionary tables, views ,other procedures etc you want to use in AMDP methods has to be declared while implementing using keyword USING