SlideShare a Scribd company logo
1 of 205
Download to read offline
ABAP Programming for SAP HANA
.
.
PARTICIPANT HANDBOOK
INSTRUCTOR-LED TRAINING
.
Course Version: 13
Course Duration: 4 Day(s)
Material Number: 50136485
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
SAP Copyrights and Trademarks
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
No part of this publication may be reproduced or transmitted in any form or for any purpose
without the express permission of SAP SE or an SAP affiliate company.
SAP and other SAP products and services mentioned herein as well as their respective
logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in
Germany and other countries. Please see http://global12.sap.com/corporate-en/legal/
copyright/index.epx for additional trademark information and notices.
Some software products marketed by SAP SE and its distributors contain proprietary
software components of other software vendors.
National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational
purposes only, without representation or warranty of any kind, and SAP SE or its affiliated
companies shall not be liable for errors or omissions with respect to the materials. The only
warranties for SAP SE or SAP affiliate company products and services are those that are
set forth in the express warranty statements accompanying such products and services, if
any. Nothing herein should be construed as constituting an additional warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of
business outlined in this document or any related presentation, or to develop or release any
functionality mentioned therein. This document, or any related presentation, and SAP SE’s
or its affiliated companies’ strategy and possible future developments, products, and/or
platform directions and functionality are all subject to change and may be changed by SAP
SE or its affiliated companies at any time for any reason without notice. The information in
this document is not a commitment, promise, or legal obligation to deliver any material,
code, or functionality. All forward-looking statements are subject to various risks and
uncertainties that could cause actual results to differ materially from expectations. Readers
are cautioned not to place undue reliance on these forward-looking statements, which
speak only as of their dates, and they should not be relied upon in making purchasing
decisions.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Typographic Conventions
American English is the standard used in this handbook.
The following typographic conventions are also used.
This information is displayed in the instructor’s presentation
Demonstration
Procedure
Warning or Caution
Hint
Related or Additional Information
Facilitated Discussion
User interface control Example text
Window title Example text
© Copyright. All rights reserved. iii
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
iv © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Contents
vii Course Overview
1 Unit 1: Introduction
2 Lesson: SAP HANA Basics and Technical Concepts
12 Lesson: Introducing the SAP HANA Studio
19 Lesson: ABAP and SAP HANA
28 Lesson: Introducing the ABAP Development Tools (ADT)
37 Unit 2: Taking ABAP to SAP HANA
38 Lesson: SAP HANA as Secondary Database– Access via Open SQL
42 Lesson: Static Code Checks to Prepare ABAP Code for SAP HANA
49 Lesson: Tools to Analyse Potential Performance Issues
54 Lesson: Guided Performance Analysis
61 Lesson: Performance Rules and Guidelines for SAP HANA
65 Unit 3: Database Independent Code-to-Data
67 Lesson: Classical Open SQL and Its Limitations
72 Lesson: Enhanced Open SQL
77 Lesson: Core Data Services in ABAP
88 Lesson: Associations in Core Data Services
93 Lesson: Core Data Services with Input Parameters
99 Lesson: Incorporating Authorization Checks with CDS
105 Unit 4: SAP HANA specific Code-to-Data
106 Lesson: ABAP Database Connectivity (ADBC)
109 Lesson: Native SQL Syntax
113 Lesson: ABAP-Managed Database Procedures
121 Lesson: Debugging ABAP-Managed Database Procedures
129 Unit 5: Consuming SAP HANA Objects in ABAP
130 Lesson: Working with Views in SAP HANA Studio
137 Lesson: Consuming SAP HANA Views using Native SQL
140 Lesson: Working with Database Procedures in SAP HANA Studio
145 Lesson: Calling SAP HANA Procedures in ABAP
149 Unit 6: SAP HANA Proxy Objects
150 Lesson: Accessing SAP HANA Views via ABAP Dictionary External
Views
156 Lesson: Calling SAP HANA Procedures via ABAP Database
Procedure Proxies
162 Lesson: Transport of SAP HANA Objects
© Copyright. All rights reserved. v
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
167 Unit 7: Advanced Topics
168 Lesson: Using SAP HANA Full Text Search
180 Lesson: ABAP List Viewer with Integrated Database Access (ALV
IDA)
191 Unit 8: Case Study: Optimize a Report on Flight Customer Revenue
192 Lesson: Optimizing a Report with CDS View and ALV IDA
193 Unit 9: Appendix: Other New ABAP Language Elements
194 Lesson: Additional ABAP Language Enhancements
vi © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Course Overview
TARGET AUDIENCE
This course is intended for the following audiences:
● Developer
● Development Consultant
© Copyright. All rights reserved. vii
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
viii © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
UNIT 1 Introduction
Lesson 1
SAP HANA Basics and Technical Concepts 2
Lesson 2
Introducing the SAP HANA Studio 12
Lesson 3
ABAP and SAP HANA 19
Lesson 4
Introducing the ABAP Development Tools (ADT) 28
UNIT OBJECTIVES
● Describe SAP HANA Basics
● Understand the fundamental technical concepts of SAP HANA
● Explain the central functions of HANA Studio
● Switch between different perspectives in the SAP HANA Studio
● Set up a connection to a SAP HANA database
● Understand schemata and tables in SAP HANA Studio
● Analyze the definition of tables in SAP HANA Studio
● Explain the SAP HANA and ABAP Evolution
● Describe the various Code-to-Data Concepts
● Determine if HANA’s row store or column store is used for an ABAP transparent table, and
which indices are used on HANA
● Use the ABAP Development Tools in Eclipse
© Copyright. All rights reserved. 1
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Unit 1
Lesson 1
SAP HANA Basics and Technical Concepts
LESSON OVERVIEW
In this lesson, you learn how to describe SAP HANA goals, technical innovations, and
challenges; understand the fundamental technical concepts of SAP HANA; and determine if
SAP HANA’s row store or column store is used for an ABAP transparent table and which
indices are used on SAP HANA.
Business Example
Your company has recognized SAP HANA as an important strategic topic and has asked you
to refresh your ABAP skills, paying particular attention to those required to develop or review
code that leverages the strengths of SAP HANA.
LESSON OBJECTIVES
After completing this lesson, you will be able to:
● Describe SAP HANA Basics
● Understand the fundamental technical concepts of SAP HANA
SAP HANA Goals
Figure 1: Today's Technology Requires Trade-off Decisions
Developing applications using technology that pre-dates SAP HANA typically required making
several trade-off decisions.
The figure, Today's Technology Requires Trade-off Decisions, shows the five dimensions of
requirements that are typical for business applications. So far, these dimensions have been in
conflict.
For example, you had to decide between providing a high-speed application and developing an
application that does not require special preparation of the data, such as calculating
aggregations beforehand and storing the results in addition to the base data. In addition, t was
2 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
not possible to develop an application which is both real-time and able to analyze a large
amount of data, perhaps even unstructured data, simultaneously.
Figure 2: SAP HANA: Delivers Across Five Dimensions
SAP HANA tries to deliver across all these five dimensions, so that you no longer have to
make so many trade-off decisions. The goal is to enable the development of applications that
combine Online Transaction Processing (OLTP) and Online Analytical Processing (OLAP)
usage patterns.
SAP HANA Goals
● Enable new applications and optimize existing applications
● High performance and scalability
● Hybrid data management system – combining different paradigms in one system
● Compatibility and standard Database Management System (DBMS) features
● Support for text analysis, indexing, and search
● Cloud support and application isolation
● Support for temporal tables
● Executing application logic inside the data layer
SAP HANA has the following goals:
Enable new applications and optimize existing applications
SAP HANA is an in-memory data platform that is deployable as an appliance or in the
cloud and makes full use of the capabilities of current hardware to increase application
performance, reduce cost of ownership, and enable new scenarios and applications that
were not possible before.
High performance and scalability
SAP HANA is designed to make full use of multi-core CPUs by parallelization of
execution. It can be distributed across multiple servers to achieve good scalability in
terms of both data volume and concurrent requests.
Lesson: SAP HANA Basics and Technical Concepts
© Copyright. All rights reserved. 3
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Hybrid data management system – combining different paradigms in one system
SAP HANA architecture integrates different in-memory storages (column-based, row-
based, and object-based), traditional disk-based tables, text analysis and search, and
built-in support for planning. Combining all these capabilities in a single product not only
improves performance but reduces overall complexity and cost.
Compatibility and standard DBMS features
An important goal is the possibility to use the SAP HANA database system as a
replacement for any standard relational database management system. The SAP HANA
database system is a full relational database management system with SQL interface,
transactional isolatio,n and recovery (ACID properties) and high availability. SAP
applications that use Open SQL should run on SAP HANA without changes.
Support For text analysis, indexing and search
An important goal of SAP HANA is to provide powerful analysis, and text indexing and
search capabilities that support a state-of-the-art search experience. This includes full
text search with advanced features, such as free style search (without knowing the name
of attributes in the database), linguistic search, and fault-tolerant fuzzy search.
Cloud support and application isolation
In cloud deployments, a system must be shared – including physical servers and installed
software – between multiple customers. SAP HANA will support this in the future, with
the planned ability to host multiple isolated databases within a single SAP HANA system.
The databases inside one system will have their own data, metadata, and users, but will
share the same hardware, the same SAP HANA software installation, and the system
administration. This feature helps to support cloud scenarios – but it can also be used in
an on-premise deployment, for example, for running multiple unrelated applications in
one SAP HANA system with effective isolation and resource management.
Support for temporal tables
SAP applications that use Open SQL should run on SAP HANA without changes. In
temporal tables, update operations do not modify the existing records. Instead, new
versions of the data records are inserted. Applications may use temporal tables, for
example, for time-based reporting and analysis or for versioning and change recording
purposes.
Executing application logic inside the data layer
To benefit from the parallelization and optimization capabilities of SAP HANA,
applications must execute data intensive operations on the database level. Pushing
calculations to the database layer can also significantly reduce the amount of data that
needs to be transferred between the database and application server. SAP HANA allows
application developers to define application-specific functions that are executed inside
the database layer.
SAP HANA Application Architectures
SAP HANA can be used in different architectural scenarios, which in turn provide the
technological base for the different application areas.
Unit 1: Introduction
4 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Types of SAP HANA-Based Applications
Figure 3: Architectural Scenarios
SAP HANA can be used in different architectural scenarios, which in turn provide the
technological base for the different application areas.
From an ABAP programmer’s point of view, there are two groups of scenarios, as follows:
● Scenarios in which SAP HANA functions as the database for an Application Server ABAP
● Scenarios based on a standalone SAP HANA Server
Although the non-ABAP scenarios are mentioned here, they are not the focus of this course.
The first type are data warehouses, in which data is typically replicated from existing
applications into a separate SAP HANA database, on top of which analytical content is
developed and then consumed using business intelligence tools or simply Microsoft Excel.
A second type of HANA-based application consists of the newly-built, native applications
developed using SAP HANA extended application services.
Figure 4: SAP HANA as Database for ABAP Applications
The primary concern of this course is to learn how to optimize ABAP applications directly
running on SAP HANA, that is, applications using SAP HANA as the primary database
Lesson: SAP HANA Basics and Technical Concepts
© Copyright. All rights reserved. 5
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
underneath the ABAP stack. A typical example of this kind of application is SAP CRM powered
by SAP HANA, or the Business Suite powered by SAP HANA.
The course also covers the types of applications shown in the right hand side of the figure,
SAP HANA as Database for ABAP Applications, which use SAP HANA to accelerate ABAP
applications by using a separate SAP HANA server apart from the ABAP stack. This replicates
some of the ABAP system’s data into SAP HANA and calls SAP HANA remotely from ABAP to
speed up selected reports or transactions.
SAP HANA Innovations and Challenges
Figure 5: What Made SAP HANA Possible?
Dramatically improved hardware economics and technology innovations in software made it
possible for SAP to deliver its vision of the real-time enterprise with in-memory business
applications. Understanding them is important to an understanding of SAP HANA’s
performance characteristics.
In-Memory Computing and the Shift of Performance Bottlenecks
Historically, database systems were designed to perform well on computer systems with
limited RAM. This had the effect that slow disk I/O was the main bottleneck in data
throughput. Consequently, the architecture of those systems was designed with a focus on
optimizing disk access, for example, by minimizing the number of disk blocks (or pages) to be
read into the main memory when processing a query. In addition, CPUs had a single core and
networks were far slower.
Unit 1: Introduction
6 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Figure 6: Shift of Performance Bottlenecks
Computer architecture has changed in recent years. Multi-core CPUs (multiple CPUs on one
chip or in one package) are now standard, with fast communication between processor cores
enabling parallel processing. Main memory is no longer a limited resource, and modern
servers can have 2TB of system memory, which allows complete databases to be held in
RAM.
Currently, server processors have up to 64 cores and 128 cores will soon be available. With
the increasing number of cores, CPUs are able to process increased data per time interval.
This shifts the performance bottleneck from disk I/O to the data transfer between CPU cache
and main memory.
Figure 7: New Bottlenecks Become Important – How To Avoid Them
To get the best performance from current hardware, the new bottlenecks have to be avoided
by addressing the challenges as follows:
Lesson: SAP HANA Basics and Technical Concepts
© Copyright. All rights reserved. 7
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
● Avoid CPU cache misses and expensive data transfer from main memory into the CPU –
optimize loading the data into the CPU.
● Avoid idling CPU cores – make use of parallelism by using all the cores of a CPU, and
several CPUs.
Column Store Versus Row Store
Figure 8: Row Store
By accessing data in column-store order, you benefit immensely from simplified table scan
and data pre-caching. This can make all the difference in performance.
Figure 9: Column Store
Unit 1: Introduction
8 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Data Compression
Figure 10: Columnar Dictionary Compression
SAP HANA uses different, efficient compression methods, such as dictionary encoding, run-
length encoding, and more. This has the following benefits:
● It reduces the amount of memory required.
● It speeds up operations on columns because the columns can be loaded into the CPU
caches faster and with fewer loading cycles.
● It speeds up operations on columns because many comparisons become integer value
comparisons. For example, these are faster than string comparisons.
Lesson: SAP HANA Basics and Technical Concepts
© Copyright. All rights reserved. 9
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Partitioning and Parallel Processing
Figure 11: Parallel Processing
On SAP HANA and with column storage, data is only partially blocked. This makes parallel
processing possible. Even the same column can be split up and processed by different cores
at the same time.
Figure 12: Using Partitioning to Further Leverage Parallelism
The use of parallelism can be taken a step further by creating different partitions of the data
to be stored and processed on different blades. This allows for the management and
processing of huge amounts of data.
Unit 1: Introduction
10 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
LESSON SUMMARY
You should now be able to:
● Describe SAP HANA Basics
● Understand the fundamental technical concepts of SAP HANA
Lesson: SAP HANA Basics and Technical Concepts
© Copyright. All rights reserved. 11
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Unit 1
Lesson 2
Introducing the SAP HANA Studio
LESSON OVERVIEW
In this lesson, you learn how to explain the central functions of SAP HANA Studio, switch
between different Perspectives in SAP HANA Studio, set up a connection to an SAP HANA
database, understand schemata and tables in SAP HANA Studio, and analyze the definition of
tables in SAP HANA Studio.
Business Example
Your company has recognized SAP HANA as an important strategic topic and has asked you
to refresh your ABAP skills, paying particular attention to those required to develop or review
code that leverages the strengths of SAP HANA.
LESSON OBJECTIVES
After completing this lesson, you will be able to:
● Explain the central functions of HANA Studio
● Switch between different perspectives in the SAP HANA Studio
● Set up a connection to a SAP HANA database
● Understand schemata and tables in SAP HANA Studio
● Analyze the definition of tables in SAP HANA Studio
SAP HANA Studio – An Eclipse-Based Tool
Figure 13: SAP HANA Studio – An Eclipse-Based Development Environment
12 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
When you start optimizing ABAP applications for SAP HANA, you may have to access the SAP
HANA layer or the SAP HANA database server itself to, for example, prototype native SQL
statements, to look at SAP HANA artifacts such as attribute views, column views, or database
procedures, or to debug database procedures.
The tool to perform such tasks on the SAP HANA layer is the SAP HANA studio.
SAP HANA studio is an Eclipse-based integrated development environment that provides
tools to administer, monitor, and configure SAP HANA systems.
These tools are based on existing Eclipse frameworks.
SAP chose Eclipse as the platform for an SAP HANA Integrated Development Environment
(IDE) because Eclipse is SAP’s strategic platform for integrated design-time and development
tools in general. The open Eclipse platform offers first-class user experience, powerful
platform capabilities, and a broad and vivid ecosystem that regularly contributes
enhancements and extensions.
Eclipse is a platform that has been designed for building integrated Web and application
development tools. The platform does not provide a great deal of end-user functionality by
itself. The value of the platform is what it encourages: rapid development of integrated
features based on a plugin model.
SAP plays an active role in the Eclipse Foundation as one of its strategic members. Many of
the SAP design-time, development, and administration tools already use the Eclipse platform.
These include SAP NetWeaver Visual Composer, the Sybase Unwired Platform, and the SAP
HANA studio.
As a result of this SAP strategy, SAP also provides an Eclipse-based development
environment for ABAP called ABAP Development Tools for Eclipse (ADT). This makes it
possible to combine both development environments in a single, common IDE for both ABAP
and SAP HANA development.
Figure 14: SAP HANA Studio – Perspectives and Views
Lesson: Introducing the SAP HANA Studio
© Copyright. All rights reserved. 13
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Like most Eclipse-based development environments, SAP HANA studio provides several
perspectives within the Eclipse workbench.
Each perspective is tailored for particular groups of tasks and is a pre-configured set of panes
called views. Examples of perspectives are as follows:
● Administration console – to administer, monitor and configure SAP HANA systems.
● Modeler – to develop information models and database procedures.
● SAP HANA development – to develop native SAP HANA-based applications using SAP
HANA extended application services.
Examples of views are as follows:
● Systems – visible in most SAP HANA perspectives and showing the list of SAP HANA
systems the IDE is connected to.
● Properties – showing properties of the currently selected object, for example, of a
configured SAP HANA system.
● Job log – showing the list of recent jobs performed, for example, imports of development
objects and activations.
Details of SAP HANA Studio
Figure 15: Most Relevant Perspective For ABAP Developers: Modeler
The Modeler is the perspective most relevant for ABAP developers. It provides access to the
views and database procedures that you can consume in the ABAP environment. You can
open it using the menu item Window → Open Perspective or the Open Perspective button in
the toolbar.
A central part of this perspective is the Systems view on the left-hand side. This view contains
a list of systems. Each system represents a logon to an SAP HANA system with a particular
user. Systems can be grouped in folders to structure the list.
Unit 1: Introduction
14 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Figure 16: System View
Each system shows a hierarchy of objects visible to this user.
The catalog consists of one or several schemas, each containing a set of database objects,
such as database tables and database views.
The content contains models, that is, specific objects that allow optimized access to the
database tables. Part of these models are SAP HANA views and database procedures. SAP
HANA views and database procedures are arranged in content packages, which are similar to
ABAP packages, as they group objects that logically belong together.
Systems – Access to SAP HANA Server
Figure 17: Connecting to an SAP HANA Database
To connect to a SAP HANA system and see the corresponding catalog and content, use the
Systems view, and the context menu item Add System .
To add a system, you need the following:
Lesson: Introducing the SAP HANA Studio
© Copyright. All rights reserved. 15
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
● The host name, on which the SAP HANA system is installed. Note that this is typically
different from the host of the ABAP system.
● The instance number of the SAP HANA system. Again, note that this is typically different
from the instance number of the ABAP system.
● A description.
● The database user – also different from your ABAP user.
● The password for the database user.
The Catalog – Tables
Figure 18: Table Definitions
Once connected, you can open the database catalog and look, for example, at the definition of
tables on the SAP HANA layer. The table editor also allows the export of the SQL statement
used to create the database table.
Unit 1: Introduction
16 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
SAP HANA Content – Packages and Models
Figure 19: SAP HANA Content – Packages, Models, Delivery Units
To develop SAP HANA information models, special types of views and database procedures
for optimized read access, you should create your own Content packages.
Transport of SAP HANA Content: Delivery Units
To transport SAP HANA content, packages are assigned to delivery units. Each package may
be assigned to one delivery unit only.
Navigate to the administration view for delivery units from the Quick Launch view.
Each delivery unit must have a unique name. When creating a new delivery unit, a vendor
name is automatically derived from the system settings and linked with this delivery unit. The
SAP vendor name is sap.com.
You can assign whole hierarchies of packages to the same delivery unit from within the
administration of delivery units.
Hint:
Alternatively, a delivery unit can be entered in the definition of a package.
LESSON SUMMARY
You should now be able to:
● Explain the central functions of HANA Studio
● Switch between different perspectives in the SAP HANA Studio
● Set up a connection to a SAP HANA database
● Understand schemata and tables in SAP HANA Studio
Lesson: Introducing the SAP HANA Studio
© Copyright. All rights reserved. 17
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
● Analyze the definition of tables in SAP HANA Studio
Unit 1: Introduction
18 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Unit 1
Lesson 3
ABAP and SAP HANA
LESSON OVERVIEW
In this lesson you learn, how SAP HANA influences the way we design and implement ABAP
applications. You get an overview of the strategies that exist for optimizing ABAP applications
based on SAP HANA. And you will see that starting with ABAP Release 7.40, SAP introduced
new ABAP language features, repository object types, development tools and analysis tools in
order to support such optimizations.
Business Example
Your company has recognized SAP HANA as an important strategic topic and has asked you
to refresh your ABAP skills, paying particular attention to those required to develop or review
code that leverages the strengths of SAP HANA.
LESSON OBJECTIVES
After completing this lesson, you will be able to:
● Explain the SAP HANA and ABAP Evolution
● Describe the various Code-to-Data Concepts
● Determine if HANA’s row store or column store is used for an ABAP transparent table, and
which indices are used on HANA
ABAP Programming for SAP HANA: Evolution and Opportunities
Figure 20: SAP HANA Evolution
© Copyright. All rights reserved. 19
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
What's in it for ABAP Programmers?
The new capabilities of SAP HANA offer a huge variety of opportunities for ABAP Developers.
Figure 21: What's in it for ABAP Programmers?
Accelerate
By optimizing the coding of long-running background jobs for SAP HANA, the runtime for
these jobs can be reduced. More jobs can be executed in the same time, and particularly
costly tasks are possible in one go, rather than splitting them up.
Extend
In the past, some reports had to be executed in the background, simply because their
runtime was too long for dialog processing. Consequently, users worked on snapshots or
pre-aggregated data sets. By optimizing these reports with SAP HANA, they can be
offered as online reports again, displaying real-time data with full drill-down capability.
Innovate
With SAP HANA's analysis and calculation capabilities, ABAP developers can design new
applications that would not have been possible in the past.
Unit 1: Introduction
20 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Optimizing ABAP Applications Running on SAP HANA
Figure 22: SAP NetWeaver AS ABAP Support for Optimizing Applications
Starting with release 7.4, ABAP provides support for optimizing ABAP applications running on
SAP HANA.
There are transparent optimizations you do not see as an application developer, but which
you benefit from because they happen under the hood. An example is the SELECT… FOR
ALL ENTRIES… statement in Open SQL, the implementation of which has been improved.
New performance analysis tools are available and existing tools, such as static code checks
and the runtime analysis, have been improved to effectively support the optimization of
existing ABAP code.
The ABAP language and the Open SQL language have been extended. For example, OpenSQL
now supports more complicated joins and sub-queries, and there are ways to integrate SAP
HANA stored procedures in ABAP code.
The use of SAP HANA artifacts has been simplified. For example, you can access SAP HANA
column views through the ABAP Dictionary using Open SQL.
Some re-use components have been extended or optimized for SAP HANA, such as the SAP
List Viewer (ALV).
On top of all this, the ABAP platform team provides guidelines for optimizing ABAP code
running on SAP HANA.
Lesson: ABAP and SAP HANA
© Copyright. All rights reserved. 21
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Figure 23: ABAP Dictionary Extensions in ABAP 7.4
An example of an ABAP Dictionary extension in ABAP 7.4 is the ability to control which store a
table of the ABAP system should live in.
A new tab has been added to the Maintain Technical Settings form for database tables. The
new tab is called DB-Specific Properties and allows for switching between the following three
storage types when running on an SAP HANA database:
● Storage type Column Store creates the database table in the SAP HANA column store, or
moves it there.
● Storage type Row Store creates the database table in the SAP HANA row store, or moves it
there.
● This setting can be changed after the table has been created, and the table will be moved
into the other store. Use this with caution, however, since it may involve reorganizing table
contents, should such content exist already.
A New Programming Approach
Figure 24: New Programming Approach
Unit 1: Introduction
22 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
The arrival of in-memory technology on the database layer also requires a change in the way
we design and implement applications.
The basic approach of classic ABAP programming was as follows:
Keep the load from the database.
Get all the data you need on the application server.
Do your processing in ABAP.
In order to benefit the most from SAP HANA's capabilities, it is better to do expensive
calculations and aggregations on the database itself, rather than transferring huge amounts
of data onto the ABAP application server. This is a fundamental change to the ABAP
programming paradigm. It is very often referred to as “Code-to-Data ” as opposed to the
classic “Data-to-Code ”approach.
Bottom-Up Approach for Code-to-Data
One way of approaching the code-to-data paradigm is to use native SQL to access SAP HANA
specific functionality, like built-in functions. Encoding all computations in native SQL
statements has a drawback, however, in that you have to get the SQL statements right, for
example the join conditions, the built-in functions, and so on. In addition, encoding everything
in native SQL statements makes reusing parts of the computations difficult.
Bottom-Up Approach with Direct Access to SAP HANA Artefacts (Native SQL)
Figure 25: Possible Approaches with AS ABAP < 7.4 SP02
An alternative approach makes use of the fact that SAP HANA provides advanced view
modeling capabilities through SAP HANA column views. Modeling such views leads to more
reusable results and requires less programming.
If the computations are too complex to be modeled using SAP HANA views, using database
procedures implemented in SAP HANA SQL script is another alternative.
Both options can be interpreted as bottom-up approaches, because you first model and
respectively implement an artefact on the SAP HANA layer, and then call the existing SAP
HANA artefact in ABAP. In ABAP releases below ABAP 7.4 SP02, or in scenarios with SAP
HANA as secondary database, such calls always require using native SQL.
Lesson: ABAP and SAP HANA
© Copyright. All rights reserved. 23
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Bottom-Up Approach with Proxy Objects
Figure 26: Bottom-Up Approach with AS ABAP 7.4 ≥ SP02
Starting with ABAP 7.4 SP02, ABAP provides new repository objects to simplify the bottom-
up approach. These new objects are created in the ABAP repository as representatives or
Proxy Objects for the objects created on SAP HANA. Access to the proxy objects does not
require the use of native SQL.
You can use existing SAP HANA artefacts natively in ABAP by doing the following:
● Create so-called External Views in the ABAP Dictionary to represent native SAP HANA
column views.
● Create so-called Database Procedure Proxies in the ABAP Dictionary to represent SAP
HANA native database procedures.
There is also a proxy object for SAP HANA Delivery Units, the so-called SAP HANA Transport
Container. It helps to synchronize the otherwise separated lifecycle managements of ABAP
objects and SAP HANA artefacts.
Caution:
Creating database procedure proxies is not recommended. It is covered in the
course only in case you encounter such proxies in your ABAP system.
Unit 1: Introduction
24 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Top-Down-Approach for Code-to-Data
Figure 27: Top-Down Approach with AS ABAP 7.4 ≥ SP05
Since Release 7.40 SP05, ABAP provides additional capabilities to support the code-to-data
paradigm. This new approach can be called the top-down approach. Compared to the
bottom-up approach, the ABAP stack manages all entities and deploys all artefacts from the
ABAP layer into the database.
Figure 28: Code-to-Data Capabilities as off ABAP 7.4
Using SAP HANA-specific features is improved by introducing a new concept called ABAP-
Managed Database Procedures.
A Database-oriented programming model is supported better through the following:
● An advanced Open SQL, supporting more of the SQL-92 standard
Lesson: ABAP and SAP HANA
© Copyright. All rights reserved. 25
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
● New capabilities for defining views using a common set of domain-specific languages and
services for defining and consuming semantically rich data models called Core Data
Services
Transparent Optimizations are improvements in the ABAP stack itself. Your code directly
benefits from this without any adjustments. The following are examples of transparent
optimizations:
● Fast Data Access, a new data exchange protocol between the ABAP stack and the
database
● Optimizations of SELECT ... INTO ITAB and of SELECT SINGLE
● Optimizations of SELECT ... FOR ALL ENTRIES
Performance Improvement Versus Code Adjustments
Figure 29: Performance Improvement Versus Code Adjustments
The different code-to-data options correlate with the potential gain in performance. However,
the complexity of the resulting code may also increase the more code is moved to the
database or made database-specific, as follows:
● Transparent optimizations in principle improve performance without any code
adjustments. Some code adjustments may be necessary while migrating to SAP HANA,
however, to profit from the adjustments.
● Using enhanced Open SQL and the advanced view definition capabilities, you can create
new data models and consume them in ABAP, thereby improving the productivity and
performance without database-specific artefacts.
● Using native database features may be necessary to achieve the best performance, but
the code adjustment effort might increase.
LESSON SUMMARY
You should now be able to:
● Explain the SAP HANA and ABAP Evolution
Unit 1: Introduction
26 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
● Describe the various Code-to-Data Concepts
● Determine if HANA’s row store or column store is used for an ABAP transparent table, and
which indices are used on HANA
Lesson: ABAP and SAP HANA
© Copyright. All rights reserved. 27
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Unit 1
Lesson 4
Introducing the ABAP Development Tools
(ADT)
LESSON OVERVIEW
As an open framework, Eclipse can host a whole range of development tools. As well as the
SAP HANA Studio environment, SAP also provides a suite of tools known as the ABAP
Development Tools. These enable you to develop ABAP resources using Eclipse as a front-
end development environment.
Business Example
Your company has recognized SAP HANA as an important strategic topic and has asked you
to refresh your ABAP skills, paying particular attention to those required to develop or review
code that leverages the strengths of SAP HANA.
LESSON OBJECTIVES
After completing this lesson, you will be able to:
● Use the ABAP Development Tools in Eclipse
Using ABAP Development Tools
Figure 30: ABAP Development Tools for SAP NetWeaver – Architecture
ABAP Development Tools provides the following:
● A brand new ABAP development experience on top of the Eclipse platform
28 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
● An open platform for developing new ABAP-related tools
● A set of open, language and platform-independent APIs that developers can use to build
new custom tools for the ABAP environment
Benefits of Eclipse
With ABAP Development Tools in Eclipse you benefit from the usability, speed, and flexibility
of Eclipse, while also benefitting from proven ABAP Workbench features.
ABAP Development Tools improves developer productivity by offering better refactoring
functionality, code completion, auto-insertion, and code templates. It also includes an
invaluable Quick Fix feature and is highly navigable.
ABAP Development Tools allows you to connect to multiple ABAP systems and provides
session failover, reducing the impact of lost connections. It also enables cross-platform
development by integrating ABAP and non-ABAP development tools in a single, powerful
integrated development environment (IDE).
Note:
In addition, ABAP Development Tools is tightly integrated with SAP HANA Studio,
SAP UI5 tools, and Java.
The architecture of ABAP Development Tools for SAP NetWeaver is an architecture designed
for ease of use and flexibility. It is designed to allow developers to use a single Eclipse client,
installed locally, that connects to several ABAP back-end systems of different releases using a
Remote Function Call (RFC)/Representational State Transfer (REST)-based protocol.
This allows developers to control all activities in a central location and helps avoid time-
consuming context switches. The client provides a set of standard Eclipse development tools,
such as the project explorer for system browsing and search views.
When you use ABAP Development Tools, you log on to an SAP back-end system and work
directly with its repository objects. In this sense, the development process is exactly the same
as when you use the ABAP Workbench, in that there is no check-out and check-in of the
objects. Each connection that you make is represented in Eclipse by an ABAP Project.
An ABAP project serves as the container for the development objects that are stored in the
particular ABAP back-end system containing the logon parameters for a particular system
logon, such as the following:
● System
● Client
● User and language
You must be logged on to the system in order to edit a particular resource. Within the project,
you can access any development object in the Repository. However, to make it easier to
manage the objects you use regularly, you can set up favorite packages for each project.
Within the project, there is a navigation view similar to the one in the ABAP Workbench. The
source library contains not only programs, but also classes, interfaces, and function modules,
which you edit in a source code editor rather than in the traditional form-based mode.
Lesson: Introducing the ABAP Development Tools (ADT)
© Copyright. All rights reserved. 29
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Note:
You can create multiple ABAP projects in Eclipse, each related to a different
system.
Figure 31: ABAP Development Tools – Editors
There are two kinds of editors in ABAP Development Tools – those for which there is a native
Eclipse implementation and those that appear in-place in the SAP GUI. The figure, ABAP
Development Tools – Editors, shows each kind – the ABAP Editor as an example of an Eclipse
editor and the ABAP Dictionary showing how the classic SAP GUI visualization appears within
the Eclipse environment.
Generally speaking, there is no requirement to use ABAP Development Tools for ABAP
development, and each developer is free to choose whether to use ABAP Development Tools
or the classic ABAP Workbench. The functions and features of Eclipse in general and ABAP
Development Tools in particular lend themselves particularly well to object-oriented
programming, with various built-in refactoring functions and support for unit testing. There
are other tasks to which the ABAP Workbench is better suited, in particular working with
module pools and the Screen Painter.
Some new functions, however, are only provided within ABAP Development Tools, and do not
have an equivalent function in the ABAP Workbench. Several of these pertain to ABAP
development for SAP HANA.
Unit 1: Introduction
30 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Working with ABAP Development Tools
Figure 32: ABAP Project
Figure 33: Native with Eclipse Look and Feel
Lesson: Introducing the ABAP Development Tools (ADT)
© Copyright. All rights reserved. 31
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Figure 34: ABAP Development Tools Quick Reference Card
ABAP Development Tools provides a large number of keyboard shortcuts that can make you
more productive. You can download a quick reference card with the most important shortcuts
from the following SCN page: http://scn.sap.com/community/abap/eclipse/blog/
2012/07/02/adt-quick-reference-card .
Examples of keyboard shortcuts ABAP developers new to ABAP Development Tools often do
not find quickly are as follows:
● Shift + F1 to format the source code, that is, use the pretty printer
● Ctrl + < and Ctrl + > to turn a line of code into a comment or to remove a comment, or Ctrl
+ 7 to toggle between commenting/de-commenting a line
● F3 to navigate to the definition of the currently selected object (forward navigation).
Pressing the Ctrl key while positioning the mouse over an object, such as a class or method
name, adds a link and allows you to navigate to the definition or implementation of the
object.
Unit 1: Introduction
32 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Figure 35: Editing Source Code
The source code editor in ABAP Development Tools provides many helpful features, such as
the following:
● Code completion, which includes keyword completion, using code templates for
completion and Content Assist to suggest completions for variable names, method names,
and so on, while typing.
● Quick Fix, which allows you to quickly resolve errors or warnings reported about the code.
There are many quick fixes available for ABAP, such as the following:
- Creating method implementations from the method definition
- Creating method definitions from implementation parts
- Creating implementation parts for interface methods
- Creating method definitions from method calls
- Creating ABAP classes or ABAP interfaces from the source code
For a complete list, please check the documentation.
Lesson: Introducing the ABAP Development Tools (ADT)
© Copyright. All rights reserved. 33
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Figure 36: Troubleshooting Tools – ABAP Debugger in Eclipse
Debugging ABAP Code
The latest ABAP debugger is completely integrated into the Eclipse debug framework.
Although it is an ABAP debugger, it behaves like all other debuggers in Eclipse you might be
familiar with because the look, feel, and functionality are all Eclipse. In other words, you can
now debug your reports, transactions, classes, Web Dynpro applications, and so on, natively
in Eclipse.
The ABAP Debugger in the ABAP Development Tools can satisfy most of your debugging
requirements. For special purposes – other than observing running code – you may still want
to use the new ABAP Debugger in the SAP GUI.
Note:
The Run > Debug menu function in Eclipse is not enabled in the ABAP Perspective.
You start the debugger by setting a breakpoint in your code and then running the ABAP
program. You can start it directly with F8.
The debugger offers, among other features, editing in the debugger. You can correct a bug
when you find it. Debugging in the IDE is not supported if you are working with a 7.0 EHP3
back-end system. For more information, please find the latest information on the SAP Service
Marketplace.
Unit 1: Introduction
34 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Figure 37: Information Sources
If you want to get a local installation of the SAP Development Tools for Eclipse, there are
several sources you can choose from, such as the following:
● The SAP Software Download Center: http://service.sap.com/swdc , part of the SAP
Service Marketplace.
● The SAP Development Tools for Eclipse Web site: http://tools.hana.ondemand.com
You can also find other products like the SAP HANA studio or the tools for SAP UI5
development via this site. It describes how to install or update the SAP Development Tools for
Eclipse using the SAP Development Tools for Eclipse update Web site.
Hint:
For more information, see the following SAP Community Network pages: http://
scn.sap.com/community/abap/eclipse and http://scn.sap.com/community/
abap/hana . They provide documentation and support on how to install the SAP
Development Tools for Eclipse.
Lesson: Introducing the ABAP Development Tools (ADT)
© Copyright. All rights reserved. 35
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Figure 38: Installed Features
The About item in the Help menu provides information about installed features and plugins.
Figure 39: Installing and Updating Features
The Check for Updates and Install New Software commands in the Help menu provide the
ability to update existing features and to find, download, and install new features (provided
you have configured suitable update sites in Eclipse).
LESSON SUMMARY
You should now be able to:
● Use the ABAP Development Tools in Eclipse
Unit 1: Introduction
36 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
UNIT 2 Taking ABAP to SAP HANA
Lesson 1
SAP HANA as Secondary Database– Access via Open SQL 38
Lesson 2
Static Code Checks to Prepare ABAP Code for SAP HANA 42
Lesson 3
Tools to Analyse Potential Performance Issues 49
Lesson 4
Guided Performance Analysis 54
Lesson 5
Performance Rules and Guidelines for SAP HANA 61
UNIT OBJECTIVES
● Describe how to access the SAP HANA database by using Open SQL and a secondary
database connection
● Use Code Inspector and ABAP Test Cockpit
● Use the ABAP Trace (SAT) and the ABAP Profiling perspective to measure and compare
runtime consumption
● Use SQL Trace (ST05) for in depth analysis of database accesses
● Use the SQL Monitor (SQLM) to identify the most important database access
● Use the Performance Tuning Worklist (SWLT) to combine static and dynamic performance
analysis results
● Understand the performance rules and guidelines for ABAP on SAP HANA
© Copyright. All rights reserved. 37
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Unit 2
Lesson 1
SAP HANA as Secondary Database– Access
via Open SQL
LESSON OVERVIEW
In this lesson, you learn how to access the SAP HANA database by using Open SQL and a
secondary database connection.
Business Example
Your company has recognized SAP HANA as an important strategic topic and has asked you
to refresh your ABAP skills, paying particular attention to those required to develop or review
code that leverages the strengths of SAP HANA.
LESSON OBJECTIVES
After completing this lesson, you will be able to:
● Describe how to access the SAP HANA database by using Open SQL and a secondary
database connection
Secondary Database Connections
Each Application Server ABAP is connected to a Database Management System (DBMS) that
contains the ABAP Repository and the database tables and views defined in this system's
ABAP Dictionary. This DBMS is referred to as its Primary Database. Aside from this primary
database connection, it is possible to establish connections to additional database
management systems or secondary database connections. In the scenario, SAP HANA as
Accelerator, where SAP HANA is used as a secondary DBMS, it is necessary to establish such
a secondary database connection to SAP HANA.
Secondary database connections, among other things, are created and maintained via
transaction DBACOCKPIT. Each database connection is identified by a name that must be
unique within the application server.
38 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Figure 40: Transaction DBACOCKPIT
Figure 41: Database connection details
Inside the connection, the DBMS is identified by a hostname and an instance number, which
relates to an SQL port. Furthermore, a database user (with password) has to be maintained.
Any access to the database via this secondary database connection is equivalent to a log on
to the database with this user.
Lesson: SAP HANA as Secondary Database– Access via Open SQL
© Copyright. All rights reserved. 39
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Access to a Secondary Database with Open SQL
Once the secondary database connection is established, it is easy to use it in ABAP programs.
Open SQL offers an additional CONNECTION, which has to be followed by the name of the
secondary database connection.
Figure 42: Open SQL Using Secondary Database Connection
However, some restrictions apply when using Open SQL to access a secondary database.
Figure 43: Open SQL over Secondary Database Connection – Restrictions
Due to the syntax check for Open SQL statements, the tables and fields the statement refers
to must exist in the ABAP Dictionary of the application server.
This implies that objects only known to SAP HANA (such as SAP HANA views or procedures)
are not accessible by Open SQL.
Unit 2: Taking ABAP to SAP HANA
40 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Note:
We learn later in this course that in order to access these objects, either native
SQL has to be used or new objects have to be created in the ABAP Dictionary that
make the SAP HANA objects visible for the syntax check.
Finally, Open SQL access to a secondary database is restricted to the default schema of the
database user in the connection. Normally, the name of this schema is identical to the user
name.
LESSON SUMMARY
You should now be able to:
● Describe how to access the SAP HANA database by using Open SQL and a secondary
database connection
Lesson: SAP HANA as Secondary Database– Access via Open SQL
© Copyright. All rights reserved. 41
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Unit 2
Lesson 2
Static Code Checks to Prepare ABAP Code for
SAP HANA
LESSON OVERVIEW
This lesson introduces some tools to analyze potential functional and performance issues in
ABAP programs when migrating to SAP HANA.
Business Example
You want to run existing ABAP code on SAP HANA. You heard of functional issues and
performance problems that might occur. You want to analyze whether this is the case and
what you can do to make your coding “SAP HANA-ready”.
LESSON OBJECTIVES
After completing this lesson, you will be able to:
● Use Code Inspector and ABAP Test Cockpit
Considerations Before Migrating to SAP HANA
Figure 44: Example: How you Should Not Access Data from the Database
ABAP Developer’s Questions: SAP HANA Impact on Custom ABAP Code
● Which of my ABAP code must be changed to avoid potential functional issues when
migrating to SAP HANA?
● Which of my ABAP code shall be optimized to ensure good performance?
● Which of my main business processes have potential for SAP HANA so that I can speed
those up massively?
● How can I find all this ABAP code easily and do the adaption efficiently?
42 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Most likely, you use SAP HANA because you want to improve the performance of your ABAP
applications. If you consider fully migrating to SAP HANA, you may also ask how to prepare
your ABAP code to avoid functional issues after the migration, and to what extent you have to
rewrite ABAP code.
SAP tools and guidelines help with these issues, and enable you to get your custom code
ready and optimized for SAP HANA.
Table 1: Migrating to SAP HANA: Affect on Existing DB-Specific ABAP Code
Technical Change Details and Examples: Affect on Database-Specific ABAP Code
Database migration Each DB has specific features and unique technical behavior. DB-
specific code may rely on these features of the database used.
SAP HANA architec-
ture
Column based architecture – as a consequence, for example, secon-
dary DB indexes are less important. DB-specific code may rely on the
existence or usage of certain DB indexes.
Depooling/declus-
tering
During the migration to SAP HANA, most pool and cluster DB tables
are transformed to transparent DB tables so that the tables can be
used in analytical scenarios. DB specific code may rely on the techni-
cal specifics of pool and cluster tables.
For more information about the details, see OSS note 1785057.
Migrating to SAP HANA is similar to other database migrations, as some technical changes
may affect existing ABAP coding. In general, however, no changes are necessary if your SQL
code follows the golden Open SQL rules. Use static checks to find SQL patterns that violate
the rules of Open SQL.
Potential Functional Issues
Figure 45: Avoiding Potential Functional Issues: Examples of Mandatory Adaptations
Standard ABAP code is fully portable between different database types. However, it is also
possible to use database-specific features explicitly or implicitly. In such situations, the code
has to be revisited when migrating to SAP HANA.
Some concrete scenarios are as follows:
Lesson: Static Code Checks to Prepare ABAP Code for SAP HANA
© Copyright. All rights reserved. 43
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
● If ABAP code uses native SQL (for example, via ADBC or EXEC SQL), this code must be
checked and adapted. The ADBC example in the figure, Avoiding Potential Functional
Issues: Examples of Mandatory Adaptations, uses the proprietary ROWNUM pseudo
column offered by some databases as an iterator to count over a result set. As this is not
supported in this form in the SQL dialect of SAP HANA, this coding needs to be adapted.
● A second example are hints to the database, respectively the database interface. These
enable optimization of query execution for specific databases. In the example shown in the
figure, Avoiding Potential Functional Issues: Examples of Mandatory Adaptations, a
specific behavior for treating the FOR ALL ENTRIES clause is defined for Microsoft SQL
Server. Such hints are ignored after a database migration, for example, to SAP HANA. In
general, it should be checked if a hint is still needed for the target database. In almost all
cases, the default behavior of SAP HANA should be sufficient.
Figure 46: Avoiding Potential Functional Issues: Examples for Mandatory Adaptations
There are more subtle scenarios. Although Open SQL is database-independent, it is possible
to rely on unspecified behavior or internals. For instance, when using SELECT to select data,
the result is not sorted unless explicit sort criteria are defined using the ORDER BY clause.
However, a certain sorting can be observed for some databases (for example, by primary key
or a specific secondary key), which existing code may rely on mistakenly.
There is no guarantee that subtle problems will not arise after database migration, for
example, when accessing the result table via a READ TABLE statement, using BINARY
SEARCH assuming a sorted table. Whenever selected data which must be sorted, the ORDER
BY clause must be used (independently of SAP HANA). This also applies to the special case of
pool/cluster tables, which are transformed into transparent tables on SAP HANA.
More unusual scenarios can include when the physical clusters and pool are accessed, or the
program code depends explicitly on the existence of indices. Such cases must also be
checked and most likely adapted after migration.
Performance Considerations
Transitioning ABAP Code to SAP HANA – Performance Considerations
● Performance of existing ABAP code after a migration
Unit 2: Taking ABAP to SAP HANA
44 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
- Some code immediately runs faster.
- Some code might be negatively impacted and should be revisited.
● Reminder of performance guidelines
- Classical performance recommendations for Open SQL remain valid.
- Some shift priorities, for example, nested selects (higher), indices (lower).
Existing ABAP code that followed the classical performance recommendations has a good
chance of immediately benefiting from SAP HANA.
In addition to enabling an existing component, a central goal of SAP HANA is to accelerate
performance and to fully benefit from HANA. In many situations, existing ABAP code might
run faster immediately after a migration to HANA.
However, there can also be situations in which existing code is negatively impacted, especially
if the classical performance recommendations were not taken into account. In general, well-
written ABAP code has a good chance of running better immediately on SAP HANA.
Code Inspector and ABAP Test Cockpit
Before migrating to SAP HANA, a static code analysis should be performed to identify
functional issues and potential impairments of performance.
Figure 47: ABAP Code Inspector
With the ABAP Code Inspector you can perform a whole range of static functional and
performance checks.
Of course, the ABAP Code Inspector has been in use long before SAP HANA and most of the
checks are not SAP HANA specific. The rules and guidelines checked by them are also valid
for any database.
Lesson: Static Code Checks to Prepare ABAP Code for SAP HANA
© Copyright. All rights reserved. 45
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
However, since SAP NetWeaver 7.40, SAP continuously extended the range of available
checks, and some of the new checks are particularly important with regard to SAP HANA
(although they are valid for other databases too). Many of these checks have been
downported into lower releases.
Code Inspector Checks to Search for Potential Functional Issues
Critical Statements
Search for DB Hints and Native SQL
Search DB Operations in Pool/Cluster Tables
Search for direct accesses to table pools and table clusters
Search problematic statements for result of SELECT/OpenCursor without ORDER BY
Search for statements that rely on implicit sorting
Code Inspector Checks to Search for Potential Performance Issues
Search problematic SELECT * statements
Search for SELECT * statements where less than a certain percentage of the fields are
used later on
Search DB operations in loops across modularization units
Search for repeated identical selects
Search SELECT .. FOR ALL ENTRIES-clauses to be transformed
Search for SELECT statements with FOR ALL ENTRIES that can be replaced by a SELECT
statement with a join
All these checks have documentation available describing how the check works, and the
meaning of the check parameters that can be maintained.
When creating a check variant, including the new checks, remember to check the parameters,
and if necessary, change them. The check parameters are documented if you are not sure
what they represent.
For example, you can check for problematic SELECT * statements. This statement in
particular has several check parameters. This check searches for SELECT * FROM dbtab
statements, in which less than a specified percentage of the fields are effectively used. The
default value for the percentage is 20%. If less than 20% of the fields are used, it is more
efficient to select only the used fields. The value of this parameter depends largely on the
database used. When on a database with a column store, such as SAP HANA, this value
should be set to a higher value than on a traditional, row store-only database.
Inspection Results
The figure, Code Inspector – Inspection Results, shows an example of the inspection result,
where two of the new checks have resulted in an error message. Remember, you can double-
click the message to navigate to the problem code.
Unit 2: Taking ABAP to SAP HANA
46 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Figure 48: Code Inspector – Inspection Results
Code Inspector As a Part of ABAP Test Cockpit (ATC)
Figure 49: ABAP Test Cockpit
With ABAP 7.02, ABAP Test Cockpit (ATC) was introduced as a holistic quality assurance
tool. The ATC integrates the code inspector, including the configuration of Code Inspector
check variants. Compared to the stand-alone Code Inspector, ATC offers the following
additional functions:
● Flexible scheduling of check runs
● Distribution of results
● General support for quality management processes
Lesson: Static Code Checks to Prepare ABAP Code for SAP HANA
© Copyright. All rights reserved. 47
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
ATC is available in SAP GUI (transaction code ATC) but it is also integrated into ABAP
Development Tools and into SAP Solution Manager.
The checks performed by the ATC can be configured. The standard configuration reuses the
ABAP Code Inspector checks, with check variant DEFAULT. The check variant used may have
to be adjusted to make sure all checks relevant to SAP HANA are performed.
LESSON SUMMARY
You should now be able to:
● Use Code Inspector and ABAP Test Cockpit
Unit 2: Taking ABAP to SAP HANA
48 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Unit 2
Lesson 3
Tools to Analyse Potential Performance Issues
LESSON OBJECTIVES
After completing this lesson, you will be able to:
● Use the ABAP Trace (SAT) and the ABAP Profiling perspective to measure and compare
runtime consumption
● Use SQL Trace (ST05) for in depth analysis of database accesses
Runtime Analysis
Before starting to optimize ABAP code detected with Code Inspector or ABAP Test Cockpit,
you may have to perform a detailed Runtime analysis to better understand the origin of the
performance issue.
Runtime Analysis in the ABAP Workbench
Figure 50: Runtime Analysis: ABAP Trace
One of the tools to perform such a runtime analysis in the classical SAP GUI is the ABAP Trace
(transaction code SAT), which replaces the older Runtime Analysis ( SE30).
Runtime Analysis and ABAP Trace have the following characteristics:
● The functions of the classic Runtime Analysis ( SE30) and the new ABAP Trace ( SAT) can
be completely used in the SAP HANA context.
© Copyright. All rights reserved. 49
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
● Both tools measure runtime of processing blocks (methods, functions, and subroutines)
or single statements.
● No database-specific functions are available.
Runtime Analysis in ABAP Development Tools
Figure 51: Runtime Analysis: ABAP Profiling Perspective in ABAP Development Tools
When using the ABAP Development Tools in Eclipse, an alternative to using the SAP GUI-
based ABAP Trace is to use a dedicated perspective in ABAP Development Tools, called the
ABAP Profiling Perspective. With this perspective, you can also create ABAP traces. The trace
files are the same as those created using the ABAP trace, which means that a trace created
using any of the two tools can also be analyzed in the other tool.
Depending on which configuration is used to generate a trace, the ABAP Profiling perspective
provides different views, including the following:
● An overview that shows, for example, which percentage of the execution time was spent in
ABAP, and which percentage on the database
● A hit list of the most time-consuming programs or methods
● Database accesses
● An ABAP Trace Call Tree view to analyze the execution path of a program. You can use the
call tree to do the following:
- Analyze the flow of a program as part of the analysis of an error. You can see which
ABAP programs are involved in the error and easily find useful places to set
breakpoints.
- Understand how an unfamiliar program works and which ABAP programs play a role in
its execution.
● A Call Timeline view, which visualizes the trace events and time consumed in the form of a
diagram. In general, information shown in this graphical view corresponds to the one in the
Unit 2: Taking ABAP to SAP HANA
50 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Call Tree view. The horizontal axis of the diagram displays the temporal sequence of each
trace event measured, whereas the vertical axis represents the call depth within a call
hierarchy. In contrast to the Call Tree, the trace events are represented not as discrete
tree nodes, but as a continuous sequence. The advantage lies in the graphical
representation and a quick detection of eye-catching patterns.
Call Tree and Call Timeline are only shown if the call tree was created when tracing (no
aggregated measurement).
In-Depth Analysis of Performance Issues
Before starting to optimize ABAP code detected with Code Inspector or ABAP Test Cockpit,
you may have to perform a detailed SQL analysis to better understand the origin of the
performance issue.
Figure 52: Runtime Analysis: SQL Trace
Uses of SQL Trace (ST05)
● Display record of all database access (including SQL calls over a secondary database
connection)
● Detect redundant or identical SELECT statements
● Locate database-related performance issues
● Display database execution plan for statements
Another tool for runtime performance analysis is the SQL Trace ( ST05). This tool in particular
analyses database accesses. It can be used for a deeper analysis once an analysis with the
ABAP Trace or the ABAP Profiling Perspective indicates that database access could be the
cause of the performance issues.
Lesson: Tools to Analyse Potential Performance Issues
© Copyright. All rights reserved. 51
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Figure 53: Performance Trace
Figure 54: Execution Plan
Hint:
Note that the Explain function in the SQL Trace is database-specific. Hence, a
database execution plan looks different for each database platform supported by
SAP.
Unit 2: Taking ABAP to SAP HANA
52 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
LESSON SUMMARY
You should now be able to:
● Use the ABAP Trace (SAT) and the ABAP Profiling perspective to measure and compare
runtime consumption
● Use SQL Trace (ST05) for in depth analysis of database accesses
Lesson: Tools to Analyse Potential Performance Issues
© Copyright. All rights reserved. 53
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Unit 2
Lesson 4
Guided Performance Analysis
LESSON OVERVIEW
In this lesson, you learn how to use the SQL Monitor ( SQLM) to identify the most important
database access, use the Performance Tuning Worklist ( SWLT) to combine static and dynamic
performance analysis results, and use SQL Trace ( ST05) for in-depth analysis of database
accesses.
Business Example
Your company has recognized SAP HANA as an important strategic topic and has asked you
to refresh your ABAP skills, paying particular attention to those required to develop or review
code that leverages the strengths of SAP HANA.
LESSON OBJECTIVES
After completing this lesson, you will be able to:
● Use the SQL Monitor (SQLM) to identify the most important database access
● Use the Performance Tuning Worklist (SWLT) to combine static and dynamic performance
analysis results
Best Practice when Transitioning ABAP Code for SAP HANA
Instead of analyzing each ABAP program individually, a good practice when transitioning and
optimizing ABAP applications to SAP HANA is to follow a three-step approach.
Figure 55: Steps to Transition ABAP Code for HANA
54 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
The first step is to detect those places where performance can or should be improved, and to
analyze and prioritize the findings based on the importance of the places detected.
The next step is to optimize the existing code, using the prioritized list.
An optional last step is to use SAP HANA’s new features to redesign and innovate your
business processes.
Guided Performance Optimization
Figure 56: Steps of the Guided Performance Optimization
The first two steps are supported by several tools, which in total result in a guided
performance optimization procedure, as follows:
● Static code check tools such as Code Inspector and ABAP Test Cockpit (ATC) to find
pieces of code using known critical constructs, such as deviations from the classical
performance recommendations
● Tools analyzing performance at runtime, to determine if critical constructs really cause
issues at runtime, for example, the ABAP Trace
● A new tool called SQL Monitor to determine the priority if different programs access the
database intensively
● A new tool called SQL Performance Tuning Worklist, which combines the results of static
and runtime analyses to create a prioritized worklist
Lesson: Guided Performance Analysis
© Copyright. All rights reserved. 55
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Determining an ABAP System's SQL Profile: SQL Monitor
Figure 57: New ABAP SQL Monitor
The new SQL Monitor is a powerful tool for capturing the SQL profile of a system or
transaction. SQL profile refers to aggregated data about all SQL requests executed in the
context of a certain business process, application, and so on. This includes how often each
request is executed, which tables are accessed, the total runtime, how many records are
fetched, and more.
The SQL Monitor is a new development with ABAP 7.4. However, in order to support its use
before a migration, it is also offered as part of the so-called ST-PI support Add-On provided by
SAP Active Global Support.
Figure 58: The New ABAP SQL Monitor – Architecture
A central design goal was to ensure that the SQL Monitor can run in the productive
environment because this is where the real SQL profile of an application can be observed. The
Unit 2: Taking ABAP to SAP HANA
56 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
SQL Monitor introduces only a minimal performance overhead and all data collection is done
asynchronously without additional database interaction affecting the runtime of the actual
business processes.
When the SQL Monitor is enabled, the ABAP kernel logs information about database accesses
(for example, transaction, source code position, accessed tables, and so on) using the
runtime monitor infrastructure (file based). This data is transferred periodically to the SQL
Monitor database tables (every 24 hours, with manual refresh possible). The transfer is
required for data analysis and to store the results permanently.
The SQL Monitor provides a dedicated transaction for displaying and analyzing the data,
which in turn reads from the respective database tables containing the collected data.
Figure 59: Switching the SQL Monitor on and Viewing SQL Monitor Data
After the initial setup of the SQL Monitor, you can activate or deactivate the monitor via
transaction SQLM. When you launch it, it displays the current status. You can activate it for all
application servers or for specific application servers. You can also specify an expiration date
and an upper limit for the number of records.
After data has been collected, you can view the collected SQL profile either by navigating from
transaction SQLM or by launching transaction SQLMD.
You can specify a number of filter criteria. For instance, you can filter by development objects,
such as package, object type, and name, or by request (transaction VA01, Web Dynpro
Application <ABC>), and the respective request type (for example, URL, RFC, report). You
can also define a filter for looking into accesses to concrete database tables.
You can select a certain aggregation type and a sorting of the result list.
Lesson: Guided Performance Analysis
© Copyright. All rights reserved. 57
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Figure 60: Exporting and Importing SQL Monitor Snapshots
Exporting and Importing SQL Monitor Snapshots
● Transaction SQLM offers a simple management of SQL Monitor snapshots.
● Snapshots can be as follows:
- Created based on local data
- Imported from a file (for example, from other systems)
- Exported to a file
- Removed
● To reduce data volume, basic filter criteria can be applied before snapshot creation.
As the SQL Monitor should collect data in a productive system, and the code optimizations
are usually planned in another system, such as a development system or sandbox
environment, it is desirable to be able to export and import the collected data. The SQL
Monitor supports exporting and importing snapshot data for this purpose. These tasks can
also be performed using the SQLM transaction.
Note that the exported data can also be analyzed via other tools, such as a SAP Lumira,
allowing visualizations and more complex analytical operations.
Unit 2: Taking ABAP to SAP HANA
58 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Creating a Prioritized Worklist
Figure 61: SQL Performance Tuning Worklist – Motivation
For performance optimization, combine the results of both static source code analysis
(carried out via the ATP or Code Inspector) and the SQL Monitor runtime data.
This correlation can be done in another new tool, the SQL Performance Tuning Worklist. This
tools can be used to create a ranking based on the cost and benefit of a potential
optimization.
Figure 62: SQL Performance Tuning Worklist – Usage
LESSON SUMMARY
You should now be able to:
● Use the SQL Monitor (SQLM) to identify the most important database access
Lesson: Guided Performance Analysis
© Copyright. All rights reserved. 59
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
● Use the Performance Tuning Worklist (SWLT) to combine static and dynamic performance
analysis results
Unit 2: Taking ABAP to SAP HANA
60 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Unit 2
Lesson 5
Performance Rules and Guidelines for SAP
HANA
LESSON OVERVIEW
In this lesson, you learn about the performance rules and guidelines for ABAP on SAP HANA.
Business Example
Your company has recognized SAP HANA as an important strategic topic and has asked you
to refresh your ABAP skills, paying particular attention to those required to develop or review
code that leverages the strengths of SAP HANA.
LESSON OBJECTIVES
After completing this lesson, you will be able to:
● Understand the performance rules and guidelines for ABAP on SAP HANA
Performance Guidelines for ABAP on SAP HANA
The classic performance guidelines for using Open SQL and for ABAP programming
essentially remain vaild. These guidelines can be called the five golden rules.
Figure 63: Golden Rules for Open SQL
The five golden rules are as follows:
● Keep the result set small
© Copyright. All rights reserved. 61
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
This reduces both the amount of memory used in the database system and the network
load when transferring data to the application server. To reduce the size of your result
sets, use the WHERE and HAVING clauses.
● Minimize the amount of data transferred
To only transfer the columns you really need, use SELECT with a field list, instead of
SELECT *.
● Minimize the number of database accesses
On all database systems, there is a small performance overhead associated with every
request for connection handling, SQL parsing, execution plan determination, and so on.
Avoiding such frequent single database requests is more important on SAP HANA. You
can, therefore, minimize the load on the network and the database system by minimizing
the number of times you access the database. Use JOINs and/or sub-queries instead of
nested SELECT loops.
Do not retrieve unnecessary data from the database by selecting any of the following:
- Minimal number of rows
- Minimal number of columns
- Minimal number of database interactions
● Minimize the search overhead
Minimize the size of the result set by using the WHERE and HAVING clauses. To increase the
efficiency of these clauses, formulate them to fit with the database table indexes.
● Reduce the database load
Unlike application servers and presentation servers, there is only one database server in
your system. Therefore, you should still aim to reduce the database load as much as
possible. Use the following methods: avoid reading data redundantly, use table buffering (if
applicable) and do not bypass it, and sort data in your ABAP programs.
Figure 64: Guidelines that Become More Important
Some guidelines become even more important with SAP HANA.
Unit 2: Taking ABAP to SAP HANA
62 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Keep the result set small and reduce the amount of data transferred, as follows:
● Do not retrieve rows and discard them later using CHECK or EXIT statements, for example,
in loops.
● The more fields you use in the field list, the more columns have to be unpacked. This
unpacking and reconstruction of rows is more expensive on a column store than on a row
store.
Reduce the number of database accesses, as follows:
● Use mass processing wherever possible.
● All rows and columns that are needed should be selected in one SQL statement (avoid
nested SELECTs and SELECTs in loops).
Use SELECT … FOR ALL ENTRIES instead of lots of SELECTs or SELECT SINGLEs.
Use array variants of INSERT, UPDATE, MODIFY, and DELETE.
Figure 65: Guidelines that are Changed
New guidelines are as follows:
● A WHERE clause containing non-indexed fields is not bad when executed on SAP HANA –
the in-memory full table scan is fast. To reduce main memory consumption and to improve
insert performance, most existing non-unique secondary database indices on columnar
tables can be removed.
● Calculation and aggregation in the database are efficient. On SAP HANA, it is beneficial to
move data-intensive calculations into the database.
Nevertheless, executing the same operations redundantly is not recommended.
LESSON SUMMARY
You should now be able to:
● Understand the performance rules and guidelines for ABAP on SAP HANA
Lesson: Performance Rules and Guidelines for SAP HANA
© Copyright. All rights reserved. 63
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Unit 2: Taking ABAP to SAP HANA
64 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
UNIT 3 Database Independent Code-to-
Data
Lesson 1
Classical Open SQL and Its Limitations 67
Lesson 2
Enhanced Open SQL 72
Lesson 3
Core Data Services in ABAP 77
Lesson 4
Associations in Core Data Services 88
Lesson 5
Core Data Services with Input Parameters 93
Lesson 6
Incorporating Authorization Checks with CDS 99
UNIT OBJECTIVES
● Explain Open SQL in the context of SAP HANA
● Know the limitations of classical Open SQL
● Features of Enhanced Open SQL
● Use the new Open SQL syntax for simple SELECT statements
● Use expressions in Open SQL SELECT statements
● Define database views using Core Data Services (CDS) in ABAP
● Use expressions, joins, aggregations, grouping and filtering in CDS views
● Use of union in CDS views
● Use Open SQL to select data based on CDS views
© Copyright. All rights reserved. 65
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
● Enhance a CDS view
● Use associations in Core Data Services
● Define CDS views in ABAP with scalar input parameters
● Use CDS Views with input parameters in other CDS views and in Open SQL
● Declare instance-based access permissions to CDS entities in ABAP using the Data
Control Language (DCL) of CDS
Unit 3: Database Independent Code-to-Data
66 © Copyright. All rights reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Unit 3
Lesson 1
Classical Open SQL and Its Limitations
LESSON OVERVIEW
In this lesson you learn about the limitations of classical Open SQL and why it can only be
used to a limited extent to follow the code-to-data paradigm and benefit from the potential of
SAP HANA.
Business Example
Your company ITeLO wants you to improve the performance of some ABAP applications
considerably by making use of SAP HANA, installed as a secondary database side-by-side
with the ABAP system.
LESSON OBJECTIVES
After completing this lesson, you will be able to:
● Explain Open SQL in the context of SAP HANA
● Know the limitations of classical Open SQL
The Code-to-Data Paradigm
Figure 66: Code-to-Data Paradigm
To make ABAP code truly benefit from the potential of SAP HANA, a paradigm shift is
necessary. Today's applications execute many data-intensive operations on the application
server. High-performance applications delegate data intensive operations to the SAP HANA
layer, such that they really profit from how SAP HANA can make use of parallelism and
optimized data storage and transfer on the database server. The new paradigm, therefore, is
Code-to-data instead of the old way, data-to-code.
© Copyright. All rights reserved. 67
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book
Sap ha400 en col13_hana 2.0 sps00 sAP book

More Related Content

What's hot

1000 solved questions
1000 solved questions1000 solved questions
1000 solved questions
Kranthi Kumar
 

What's hot (20)

Module pool programming
Module pool programmingModule pool programming
Module pool programming
 
Sap abap
Sap abapSap abap
Sap abap
 
1000 solved questions
1000 solved questions1000 solved questions
1000 solved questions
 
SAP Landscape
SAP Landscape SAP Landscape
SAP Landscape
 
SAP Basis Overview
SAP Basis OverviewSAP Basis Overview
SAP Basis Overview
 
Sap abap database table
Sap abap database tableSap abap database table
Sap abap database table
 
Sap abap tutorials
Sap abap tutorialsSap abap tutorials
Sap abap tutorials
 
SAP ABAP data dictionary
SAP ABAP data dictionarySAP ABAP data dictionary
SAP ABAP data dictionary
 
Technical Overview of CDS View – SAP HANA Part I
Technical Overview of CDS View – SAP HANA Part ITechnical Overview of CDS View – SAP HANA Part I
Technical Overview of CDS View – SAP HANA Part I
 
Ab1011 module pool programming
Ab1011   module pool programmingAb1011   module pool programming
Ab1011 module pool programming
 
SAP Serial number management
SAP Serial number managementSAP Serial number management
SAP Serial number management
 
Sap abap material
Sap abap materialSap abap material
Sap abap material
 
Exclusive SAP Basis Training Book | www.sapdocs.info
Exclusive SAP Basis Training Book | www.sapdocs.infoExclusive SAP Basis Training Book | www.sapdocs.info
Exclusive SAP Basis Training Book | www.sapdocs.info
 
Implementing parallel processing in abap
Implementing parallel processing in abapImplementing parallel processing in abap
Implementing parallel processing in abap
 
Workbench and customising request
Workbench and customising requestWorkbench and customising request
Workbench and customising request
 
Sap Abap Reports
Sap Abap ReportsSap Abap Reports
Sap Abap Reports
 
Introduction to ABAP
Introduction to ABAPIntroduction to ABAP
Introduction to ABAP
 
Sap hana tutorial
Sap hana tutorialSap hana tutorial
Sap hana tutorial
 
Bdc program to upload material master data mm01 code gallery - community wiki
Bdc program to upload material master data mm01   code gallery - community wikiBdc program to upload material master data mm01   code gallery - community wiki
Bdc program to upload material master data mm01 code gallery - community wiki
 
Variant Configurition in SAP: Beginners Guide | www.sapdocs.info
Variant Configurition in SAP: Beginners Guide | www.sapdocs.infoVariant Configurition in SAP: Beginners Guide | www.sapdocs.info
Variant Configurition in SAP: Beginners Guide | www.sapdocs.info
 

Similar to Sap ha400 en col13_hana 2.0 sps00 sAP book

S4F01_EN_Col17 Financial Accounting in SAP S4HANA for SAP ERP FI Professional...
S4F01_EN_Col17 Financial Accounting in SAP S4HANA for SAP ERP FI Professional...S4F01_EN_Col17 Financial Accounting in SAP S4HANA for SAP ERP FI Professional...
S4F01_EN_Col17 Financial Accounting in SAP S4HANA for SAP ERP FI Professional...
lakshmi vara
 

Similar to Sap ha400 en col13_hana 2.0 sps00 sAP book (20)

Sap ac105 col03 latest simple finance 1503 sample www.erp exams_com
Sap ac105 col03 latest simple finance 1503 sample www.erp exams_comSap ac105 col03 latest simple finance 1503 sample www.erp exams_com
Sap ac105 col03 latest simple finance 1503 sample www.erp exams_com
 
Sap ac110 col03 latest simple finance 1503 sample www erp_examscom
Sap ac110 col03 latest simple finance 1503 sample www erp_examscomSap ac110 col03 latest simple finance 1503 sample www erp_examscom
Sap ac110 col03 latest simple finance 1503 sample www erp_examscom
 
012
012012
012
 
Sap bw4 hana
Sap bw4 hanaSap bw4 hana
Sap bw4 hana
 
SAP HANA SPS09 - SAP HANA Answers
SAP HANA SPS09 - SAP HANA AnswersSAP HANA SPS09 - SAP HANA Answers
SAP HANA SPS09 - SAP HANA Answers
 
SAP HANA SPS09 - SAP HANA Platform Lifecycle Management
SAP HANA SPS09 - SAP HANA Platform Lifecycle ManagementSAP HANA SPS09 - SAP HANA Platform Lifecycle Management
SAP HANA SPS09 - SAP HANA Platform Lifecycle Management
 
Dev207 berlin
Dev207 berlinDev207 berlin
Dev207 berlin
 
SAP HANA SPS09 - SQLScript
SAP HANA SPS09 - SQLScriptSAP HANA SPS09 - SQLScript
SAP HANA SPS09 - SQLScript
 
Sap ac100 col02 latest sample www erp_examscom
Sap ac100 col02 latest sample www erp_examscomSap ac100 col02 latest sample www erp_examscom
Sap ac100 col02 latest sample www erp_examscom
 
Mastering_SAP_S_4HANA_1709_Strategies_fo.pdf
Mastering_SAP_S_4HANA_1709_Strategies_fo.pdfMastering_SAP_S_4HANA_1709_Strategies_fo.pdf
Mastering_SAP_S_4HANA_1709_Strategies_fo.pdf
 
Sap ac100 col03 sf 1503 latest sample www erp_examscom
Sap ac100 col03 sf 1503 latest sample www erp_examscomSap ac100 col03 sf 1503 latest sample www erp_examscom
Sap ac100 col03 sf 1503 latest sample www erp_examscom
 
Sap hana online training asts training
Sap hana online training asts trainingSap hana online training asts training
Sap hana online training asts training
 
download.pdf
download.pdfdownload.pdf
download.pdf
 
Sap ha240 col10 - hana sp10 version latest sample
Sap ha240   col10 - hana sp10 version latest sampleSap ha240   col10 - hana sp10 version latest sample
Sap ha240 col10 - hana sp10 version latest sample
 
SAP Abap on Hana Training Course Content
SAP Abap on Hana Training Course ContentSAP Abap on Hana Training Course Content
SAP Abap on Hana Training Course Content
 
S4F01_EN_Col17 Financial Accounting in SAP S4HANA for SAP ERP FI Professional...
S4F01_EN_Col17 Financial Accounting in SAP S4HANA for SAP ERP FI Professional...S4F01_EN_Col17 Financial Accounting in SAP S4HANA for SAP ERP FI Professional...
S4F01_EN_Col17 Financial Accounting in SAP S4HANA for SAP ERP FI Professional...
 
Anubhav abap on hana course details
Anubhav abap on hana course detailsAnubhav abap on hana course details
Anubhav abap on hana course details
 
SAP Activate Overview
SAP Activate OverviewSAP Activate Overview
SAP Activate Overview
 
SAP Learning Hub - SAP Activate - 20 September 2016
SAP Learning Hub - SAP Activate - 20 September 2016SAP Learning Hub - SAP Activate - 20 September 2016
SAP Learning Hub - SAP Activate - 20 September 2016
 
SAP HANA Cloud Platform CodeJam 2015
SAP HANA Cloud Platform CodeJam 2015SAP HANA Cloud Platform CodeJam 2015
SAP HANA Cloud Platform CodeJam 2015
 

Recently uploaded

( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
nilamkumrai
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
nirzagarg
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
ydyuyu
 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
 
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
 
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...
 

Sap ha400 en col13_hana 2.0 sps00 sAP book

  • 1. ABAP Programming for SAP HANA . . PARTICIPANT HANDBOOK INSTRUCTOR-LED TRAINING . Course Version: 13 Course Duration: 4 Day(s) Material Number: 50136485 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 2. SAP Copyrights and Trademarks © 2016 SAP SE or an SAP affiliate company. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company. SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. Please see http://global12.sap.com/corporate-en/legal/ copyright/index.epx for additional trademark information and notices. Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National product specifications may vary. These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP SE or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP SE or SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platform directions and functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, which speak only as of their dates, and they should not be relied upon in making purchasing decisions. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 3. Typographic Conventions American English is the standard used in this handbook. The following typographic conventions are also used. This information is displayed in the instructor’s presentation Demonstration Procedure Warning or Caution Hint Related or Additional Information Facilitated Discussion User interface control Example text Window title Example text © Copyright. All rights reserved. iii For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 4. iv © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 5. Contents vii Course Overview 1 Unit 1: Introduction 2 Lesson: SAP HANA Basics and Technical Concepts 12 Lesson: Introducing the SAP HANA Studio 19 Lesson: ABAP and SAP HANA 28 Lesson: Introducing the ABAP Development Tools (ADT) 37 Unit 2: Taking ABAP to SAP HANA 38 Lesson: SAP HANA as Secondary Database– Access via Open SQL 42 Lesson: Static Code Checks to Prepare ABAP Code for SAP HANA 49 Lesson: Tools to Analyse Potential Performance Issues 54 Lesson: Guided Performance Analysis 61 Lesson: Performance Rules and Guidelines for SAP HANA 65 Unit 3: Database Independent Code-to-Data 67 Lesson: Classical Open SQL and Its Limitations 72 Lesson: Enhanced Open SQL 77 Lesson: Core Data Services in ABAP 88 Lesson: Associations in Core Data Services 93 Lesson: Core Data Services with Input Parameters 99 Lesson: Incorporating Authorization Checks with CDS 105 Unit 4: SAP HANA specific Code-to-Data 106 Lesson: ABAP Database Connectivity (ADBC) 109 Lesson: Native SQL Syntax 113 Lesson: ABAP-Managed Database Procedures 121 Lesson: Debugging ABAP-Managed Database Procedures 129 Unit 5: Consuming SAP HANA Objects in ABAP 130 Lesson: Working with Views in SAP HANA Studio 137 Lesson: Consuming SAP HANA Views using Native SQL 140 Lesson: Working with Database Procedures in SAP HANA Studio 145 Lesson: Calling SAP HANA Procedures in ABAP 149 Unit 6: SAP HANA Proxy Objects 150 Lesson: Accessing SAP HANA Views via ABAP Dictionary External Views 156 Lesson: Calling SAP HANA Procedures via ABAP Database Procedure Proxies 162 Lesson: Transport of SAP HANA Objects © Copyright. All rights reserved. v For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 6. 167 Unit 7: Advanced Topics 168 Lesson: Using SAP HANA Full Text Search 180 Lesson: ABAP List Viewer with Integrated Database Access (ALV IDA) 191 Unit 8: Case Study: Optimize a Report on Flight Customer Revenue 192 Lesson: Optimizing a Report with CDS View and ALV IDA 193 Unit 9: Appendix: Other New ABAP Language Elements 194 Lesson: Additional ABAP Language Enhancements vi © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 7. Course Overview TARGET AUDIENCE This course is intended for the following audiences: ● Developer ● Development Consultant © Copyright. All rights reserved. vii For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 8. viii © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 9. UNIT 1 Introduction Lesson 1 SAP HANA Basics and Technical Concepts 2 Lesson 2 Introducing the SAP HANA Studio 12 Lesson 3 ABAP and SAP HANA 19 Lesson 4 Introducing the ABAP Development Tools (ADT) 28 UNIT OBJECTIVES ● Describe SAP HANA Basics ● Understand the fundamental technical concepts of SAP HANA ● Explain the central functions of HANA Studio ● Switch between different perspectives in the SAP HANA Studio ● Set up a connection to a SAP HANA database ● Understand schemata and tables in SAP HANA Studio ● Analyze the definition of tables in SAP HANA Studio ● Explain the SAP HANA and ABAP Evolution ● Describe the various Code-to-Data Concepts ● Determine if HANA’s row store or column store is used for an ABAP transparent table, and which indices are used on HANA ● Use the ABAP Development Tools in Eclipse © Copyright. All rights reserved. 1 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 10. Unit 1 Lesson 1 SAP HANA Basics and Technical Concepts LESSON OVERVIEW In this lesson, you learn how to describe SAP HANA goals, technical innovations, and challenges; understand the fundamental technical concepts of SAP HANA; and determine if SAP HANA’s row store or column store is used for an ABAP transparent table and which indices are used on SAP HANA. Business Example Your company has recognized SAP HANA as an important strategic topic and has asked you to refresh your ABAP skills, paying particular attention to those required to develop or review code that leverages the strengths of SAP HANA. LESSON OBJECTIVES After completing this lesson, you will be able to: ● Describe SAP HANA Basics ● Understand the fundamental technical concepts of SAP HANA SAP HANA Goals Figure 1: Today's Technology Requires Trade-off Decisions Developing applications using technology that pre-dates SAP HANA typically required making several trade-off decisions. The figure, Today's Technology Requires Trade-off Decisions, shows the five dimensions of requirements that are typical for business applications. So far, these dimensions have been in conflict. For example, you had to decide between providing a high-speed application and developing an application that does not require special preparation of the data, such as calculating aggregations beforehand and storing the results in addition to the base data. In addition, t was 2 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 11. not possible to develop an application which is both real-time and able to analyze a large amount of data, perhaps even unstructured data, simultaneously. Figure 2: SAP HANA: Delivers Across Five Dimensions SAP HANA tries to deliver across all these five dimensions, so that you no longer have to make so many trade-off decisions. The goal is to enable the development of applications that combine Online Transaction Processing (OLTP) and Online Analytical Processing (OLAP) usage patterns. SAP HANA Goals ● Enable new applications and optimize existing applications ● High performance and scalability ● Hybrid data management system – combining different paradigms in one system ● Compatibility and standard Database Management System (DBMS) features ● Support for text analysis, indexing, and search ● Cloud support and application isolation ● Support for temporal tables ● Executing application logic inside the data layer SAP HANA has the following goals: Enable new applications and optimize existing applications SAP HANA is an in-memory data platform that is deployable as an appliance or in the cloud and makes full use of the capabilities of current hardware to increase application performance, reduce cost of ownership, and enable new scenarios and applications that were not possible before. High performance and scalability SAP HANA is designed to make full use of multi-core CPUs by parallelization of execution. It can be distributed across multiple servers to achieve good scalability in terms of both data volume and concurrent requests. Lesson: SAP HANA Basics and Technical Concepts © Copyright. All rights reserved. 3 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 12. Hybrid data management system – combining different paradigms in one system SAP HANA architecture integrates different in-memory storages (column-based, row- based, and object-based), traditional disk-based tables, text analysis and search, and built-in support for planning. Combining all these capabilities in a single product not only improves performance but reduces overall complexity and cost. Compatibility and standard DBMS features An important goal is the possibility to use the SAP HANA database system as a replacement for any standard relational database management system. The SAP HANA database system is a full relational database management system with SQL interface, transactional isolatio,n and recovery (ACID properties) and high availability. SAP applications that use Open SQL should run on SAP HANA without changes. Support For text analysis, indexing and search An important goal of SAP HANA is to provide powerful analysis, and text indexing and search capabilities that support a state-of-the-art search experience. This includes full text search with advanced features, such as free style search (without knowing the name of attributes in the database), linguistic search, and fault-tolerant fuzzy search. Cloud support and application isolation In cloud deployments, a system must be shared – including physical servers and installed software – between multiple customers. SAP HANA will support this in the future, with the planned ability to host multiple isolated databases within a single SAP HANA system. The databases inside one system will have their own data, metadata, and users, but will share the same hardware, the same SAP HANA software installation, and the system administration. This feature helps to support cloud scenarios – but it can also be used in an on-premise deployment, for example, for running multiple unrelated applications in one SAP HANA system with effective isolation and resource management. Support for temporal tables SAP applications that use Open SQL should run on SAP HANA without changes. In temporal tables, update operations do not modify the existing records. Instead, new versions of the data records are inserted. Applications may use temporal tables, for example, for time-based reporting and analysis or for versioning and change recording purposes. Executing application logic inside the data layer To benefit from the parallelization and optimization capabilities of SAP HANA, applications must execute data intensive operations on the database level. Pushing calculations to the database layer can also significantly reduce the amount of data that needs to be transferred between the database and application server. SAP HANA allows application developers to define application-specific functions that are executed inside the database layer. SAP HANA Application Architectures SAP HANA can be used in different architectural scenarios, which in turn provide the technological base for the different application areas. Unit 1: Introduction 4 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 13. Types of SAP HANA-Based Applications Figure 3: Architectural Scenarios SAP HANA can be used in different architectural scenarios, which in turn provide the technological base for the different application areas. From an ABAP programmer’s point of view, there are two groups of scenarios, as follows: ● Scenarios in which SAP HANA functions as the database for an Application Server ABAP ● Scenarios based on a standalone SAP HANA Server Although the non-ABAP scenarios are mentioned here, they are not the focus of this course. The first type are data warehouses, in which data is typically replicated from existing applications into a separate SAP HANA database, on top of which analytical content is developed and then consumed using business intelligence tools or simply Microsoft Excel. A second type of HANA-based application consists of the newly-built, native applications developed using SAP HANA extended application services. Figure 4: SAP HANA as Database for ABAP Applications The primary concern of this course is to learn how to optimize ABAP applications directly running on SAP HANA, that is, applications using SAP HANA as the primary database Lesson: SAP HANA Basics and Technical Concepts © Copyright. All rights reserved. 5 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 14. underneath the ABAP stack. A typical example of this kind of application is SAP CRM powered by SAP HANA, or the Business Suite powered by SAP HANA. The course also covers the types of applications shown in the right hand side of the figure, SAP HANA as Database for ABAP Applications, which use SAP HANA to accelerate ABAP applications by using a separate SAP HANA server apart from the ABAP stack. This replicates some of the ABAP system’s data into SAP HANA and calls SAP HANA remotely from ABAP to speed up selected reports or transactions. SAP HANA Innovations and Challenges Figure 5: What Made SAP HANA Possible? Dramatically improved hardware economics and technology innovations in software made it possible for SAP to deliver its vision of the real-time enterprise with in-memory business applications. Understanding them is important to an understanding of SAP HANA’s performance characteristics. In-Memory Computing and the Shift of Performance Bottlenecks Historically, database systems were designed to perform well on computer systems with limited RAM. This had the effect that slow disk I/O was the main bottleneck in data throughput. Consequently, the architecture of those systems was designed with a focus on optimizing disk access, for example, by minimizing the number of disk blocks (or pages) to be read into the main memory when processing a query. In addition, CPUs had a single core and networks were far slower. Unit 1: Introduction 6 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 15. Figure 6: Shift of Performance Bottlenecks Computer architecture has changed in recent years. Multi-core CPUs (multiple CPUs on one chip or in one package) are now standard, with fast communication between processor cores enabling parallel processing. Main memory is no longer a limited resource, and modern servers can have 2TB of system memory, which allows complete databases to be held in RAM. Currently, server processors have up to 64 cores and 128 cores will soon be available. With the increasing number of cores, CPUs are able to process increased data per time interval. This shifts the performance bottleneck from disk I/O to the data transfer between CPU cache and main memory. Figure 7: New Bottlenecks Become Important – How To Avoid Them To get the best performance from current hardware, the new bottlenecks have to be avoided by addressing the challenges as follows: Lesson: SAP HANA Basics and Technical Concepts © Copyright. All rights reserved. 7 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 16. ● Avoid CPU cache misses and expensive data transfer from main memory into the CPU – optimize loading the data into the CPU. ● Avoid idling CPU cores – make use of parallelism by using all the cores of a CPU, and several CPUs. Column Store Versus Row Store Figure 8: Row Store By accessing data in column-store order, you benefit immensely from simplified table scan and data pre-caching. This can make all the difference in performance. Figure 9: Column Store Unit 1: Introduction 8 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 17. Data Compression Figure 10: Columnar Dictionary Compression SAP HANA uses different, efficient compression methods, such as dictionary encoding, run- length encoding, and more. This has the following benefits: ● It reduces the amount of memory required. ● It speeds up operations on columns because the columns can be loaded into the CPU caches faster and with fewer loading cycles. ● It speeds up operations on columns because many comparisons become integer value comparisons. For example, these are faster than string comparisons. Lesson: SAP HANA Basics and Technical Concepts © Copyright. All rights reserved. 9 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 18. Partitioning and Parallel Processing Figure 11: Parallel Processing On SAP HANA and with column storage, data is only partially blocked. This makes parallel processing possible. Even the same column can be split up and processed by different cores at the same time. Figure 12: Using Partitioning to Further Leverage Parallelism The use of parallelism can be taken a step further by creating different partitions of the data to be stored and processed on different blades. This allows for the management and processing of huge amounts of data. Unit 1: Introduction 10 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 19. LESSON SUMMARY You should now be able to: ● Describe SAP HANA Basics ● Understand the fundamental technical concepts of SAP HANA Lesson: SAP HANA Basics and Technical Concepts © Copyright. All rights reserved. 11 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 20. Unit 1 Lesson 2 Introducing the SAP HANA Studio LESSON OVERVIEW In this lesson, you learn how to explain the central functions of SAP HANA Studio, switch between different Perspectives in SAP HANA Studio, set up a connection to an SAP HANA database, understand schemata and tables in SAP HANA Studio, and analyze the definition of tables in SAP HANA Studio. Business Example Your company has recognized SAP HANA as an important strategic topic and has asked you to refresh your ABAP skills, paying particular attention to those required to develop or review code that leverages the strengths of SAP HANA. LESSON OBJECTIVES After completing this lesson, you will be able to: ● Explain the central functions of HANA Studio ● Switch between different perspectives in the SAP HANA Studio ● Set up a connection to a SAP HANA database ● Understand schemata and tables in SAP HANA Studio ● Analyze the definition of tables in SAP HANA Studio SAP HANA Studio – An Eclipse-Based Tool Figure 13: SAP HANA Studio – An Eclipse-Based Development Environment 12 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 21. When you start optimizing ABAP applications for SAP HANA, you may have to access the SAP HANA layer or the SAP HANA database server itself to, for example, prototype native SQL statements, to look at SAP HANA artifacts such as attribute views, column views, or database procedures, or to debug database procedures. The tool to perform such tasks on the SAP HANA layer is the SAP HANA studio. SAP HANA studio is an Eclipse-based integrated development environment that provides tools to administer, monitor, and configure SAP HANA systems. These tools are based on existing Eclipse frameworks. SAP chose Eclipse as the platform for an SAP HANA Integrated Development Environment (IDE) because Eclipse is SAP’s strategic platform for integrated design-time and development tools in general. The open Eclipse platform offers first-class user experience, powerful platform capabilities, and a broad and vivid ecosystem that regularly contributes enhancements and extensions. Eclipse is a platform that has been designed for building integrated Web and application development tools. The platform does not provide a great deal of end-user functionality by itself. The value of the platform is what it encourages: rapid development of integrated features based on a plugin model. SAP plays an active role in the Eclipse Foundation as one of its strategic members. Many of the SAP design-time, development, and administration tools already use the Eclipse platform. These include SAP NetWeaver Visual Composer, the Sybase Unwired Platform, and the SAP HANA studio. As a result of this SAP strategy, SAP also provides an Eclipse-based development environment for ABAP called ABAP Development Tools for Eclipse (ADT). This makes it possible to combine both development environments in a single, common IDE for both ABAP and SAP HANA development. Figure 14: SAP HANA Studio – Perspectives and Views Lesson: Introducing the SAP HANA Studio © Copyright. All rights reserved. 13 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 22. Like most Eclipse-based development environments, SAP HANA studio provides several perspectives within the Eclipse workbench. Each perspective is tailored for particular groups of tasks and is a pre-configured set of panes called views. Examples of perspectives are as follows: ● Administration console – to administer, monitor and configure SAP HANA systems. ● Modeler – to develop information models and database procedures. ● SAP HANA development – to develop native SAP HANA-based applications using SAP HANA extended application services. Examples of views are as follows: ● Systems – visible in most SAP HANA perspectives and showing the list of SAP HANA systems the IDE is connected to. ● Properties – showing properties of the currently selected object, for example, of a configured SAP HANA system. ● Job log – showing the list of recent jobs performed, for example, imports of development objects and activations. Details of SAP HANA Studio Figure 15: Most Relevant Perspective For ABAP Developers: Modeler The Modeler is the perspective most relevant for ABAP developers. It provides access to the views and database procedures that you can consume in the ABAP environment. You can open it using the menu item Window → Open Perspective or the Open Perspective button in the toolbar. A central part of this perspective is the Systems view on the left-hand side. This view contains a list of systems. Each system represents a logon to an SAP HANA system with a particular user. Systems can be grouped in folders to structure the list. Unit 1: Introduction 14 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 23. Figure 16: System View Each system shows a hierarchy of objects visible to this user. The catalog consists of one or several schemas, each containing a set of database objects, such as database tables and database views. The content contains models, that is, specific objects that allow optimized access to the database tables. Part of these models are SAP HANA views and database procedures. SAP HANA views and database procedures are arranged in content packages, which are similar to ABAP packages, as they group objects that logically belong together. Systems – Access to SAP HANA Server Figure 17: Connecting to an SAP HANA Database To connect to a SAP HANA system and see the corresponding catalog and content, use the Systems view, and the context menu item Add System . To add a system, you need the following: Lesson: Introducing the SAP HANA Studio © Copyright. All rights reserved. 15 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 24. ● The host name, on which the SAP HANA system is installed. Note that this is typically different from the host of the ABAP system. ● The instance number of the SAP HANA system. Again, note that this is typically different from the instance number of the ABAP system. ● A description. ● The database user – also different from your ABAP user. ● The password for the database user. The Catalog – Tables Figure 18: Table Definitions Once connected, you can open the database catalog and look, for example, at the definition of tables on the SAP HANA layer. The table editor also allows the export of the SQL statement used to create the database table. Unit 1: Introduction 16 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 25. SAP HANA Content – Packages and Models Figure 19: SAP HANA Content – Packages, Models, Delivery Units To develop SAP HANA information models, special types of views and database procedures for optimized read access, you should create your own Content packages. Transport of SAP HANA Content: Delivery Units To transport SAP HANA content, packages are assigned to delivery units. Each package may be assigned to one delivery unit only. Navigate to the administration view for delivery units from the Quick Launch view. Each delivery unit must have a unique name. When creating a new delivery unit, a vendor name is automatically derived from the system settings and linked with this delivery unit. The SAP vendor name is sap.com. You can assign whole hierarchies of packages to the same delivery unit from within the administration of delivery units. Hint: Alternatively, a delivery unit can be entered in the definition of a package. LESSON SUMMARY You should now be able to: ● Explain the central functions of HANA Studio ● Switch between different perspectives in the SAP HANA Studio ● Set up a connection to a SAP HANA database ● Understand schemata and tables in SAP HANA Studio Lesson: Introducing the SAP HANA Studio © Copyright. All rights reserved. 17 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 26. ● Analyze the definition of tables in SAP HANA Studio Unit 1: Introduction 18 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 27. Unit 1 Lesson 3 ABAP and SAP HANA LESSON OVERVIEW In this lesson you learn, how SAP HANA influences the way we design and implement ABAP applications. You get an overview of the strategies that exist for optimizing ABAP applications based on SAP HANA. And you will see that starting with ABAP Release 7.40, SAP introduced new ABAP language features, repository object types, development tools and analysis tools in order to support such optimizations. Business Example Your company has recognized SAP HANA as an important strategic topic and has asked you to refresh your ABAP skills, paying particular attention to those required to develop or review code that leverages the strengths of SAP HANA. LESSON OBJECTIVES After completing this lesson, you will be able to: ● Explain the SAP HANA and ABAP Evolution ● Describe the various Code-to-Data Concepts ● Determine if HANA’s row store or column store is used for an ABAP transparent table, and which indices are used on HANA ABAP Programming for SAP HANA: Evolution and Opportunities Figure 20: SAP HANA Evolution © Copyright. All rights reserved. 19 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 28. What's in it for ABAP Programmers? The new capabilities of SAP HANA offer a huge variety of opportunities for ABAP Developers. Figure 21: What's in it for ABAP Programmers? Accelerate By optimizing the coding of long-running background jobs for SAP HANA, the runtime for these jobs can be reduced. More jobs can be executed in the same time, and particularly costly tasks are possible in one go, rather than splitting them up. Extend In the past, some reports had to be executed in the background, simply because their runtime was too long for dialog processing. Consequently, users worked on snapshots or pre-aggregated data sets. By optimizing these reports with SAP HANA, they can be offered as online reports again, displaying real-time data with full drill-down capability. Innovate With SAP HANA's analysis and calculation capabilities, ABAP developers can design new applications that would not have been possible in the past. Unit 1: Introduction 20 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 29. Optimizing ABAP Applications Running on SAP HANA Figure 22: SAP NetWeaver AS ABAP Support for Optimizing Applications Starting with release 7.4, ABAP provides support for optimizing ABAP applications running on SAP HANA. There are transparent optimizations you do not see as an application developer, but which you benefit from because they happen under the hood. An example is the SELECT… FOR ALL ENTRIES… statement in Open SQL, the implementation of which has been improved. New performance analysis tools are available and existing tools, such as static code checks and the runtime analysis, have been improved to effectively support the optimization of existing ABAP code. The ABAP language and the Open SQL language have been extended. For example, OpenSQL now supports more complicated joins and sub-queries, and there are ways to integrate SAP HANA stored procedures in ABAP code. The use of SAP HANA artifacts has been simplified. For example, you can access SAP HANA column views through the ABAP Dictionary using Open SQL. Some re-use components have been extended or optimized for SAP HANA, such as the SAP List Viewer (ALV). On top of all this, the ABAP platform team provides guidelines for optimizing ABAP code running on SAP HANA. Lesson: ABAP and SAP HANA © Copyright. All rights reserved. 21 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 30. Figure 23: ABAP Dictionary Extensions in ABAP 7.4 An example of an ABAP Dictionary extension in ABAP 7.4 is the ability to control which store a table of the ABAP system should live in. A new tab has been added to the Maintain Technical Settings form for database tables. The new tab is called DB-Specific Properties and allows for switching between the following three storage types when running on an SAP HANA database: ● Storage type Column Store creates the database table in the SAP HANA column store, or moves it there. ● Storage type Row Store creates the database table in the SAP HANA row store, or moves it there. ● This setting can be changed after the table has been created, and the table will be moved into the other store. Use this with caution, however, since it may involve reorganizing table contents, should such content exist already. A New Programming Approach Figure 24: New Programming Approach Unit 1: Introduction 22 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 31. The arrival of in-memory technology on the database layer also requires a change in the way we design and implement applications. The basic approach of classic ABAP programming was as follows: Keep the load from the database. Get all the data you need on the application server. Do your processing in ABAP. In order to benefit the most from SAP HANA's capabilities, it is better to do expensive calculations and aggregations on the database itself, rather than transferring huge amounts of data onto the ABAP application server. This is a fundamental change to the ABAP programming paradigm. It is very often referred to as “Code-to-Data ” as opposed to the classic “Data-to-Code ”approach. Bottom-Up Approach for Code-to-Data One way of approaching the code-to-data paradigm is to use native SQL to access SAP HANA specific functionality, like built-in functions. Encoding all computations in native SQL statements has a drawback, however, in that you have to get the SQL statements right, for example the join conditions, the built-in functions, and so on. In addition, encoding everything in native SQL statements makes reusing parts of the computations difficult. Bottom-Up Approach with Direct Access to SAP HANA Artefacts (Native SQL) Figure 25: Possible Approaches with AS ABAP < 7.4 SP02 An alternative approach makes use of the fact that SAP HANA provides advanced view modeling capabilities through SAP HANA column views. Modeling such views leads to more reusable results and requires less programming. If the computations are too complex to be modeled using SAP HANA views, using database procedures implemented in SAP HANA SQL script is another alternative. Both options can be interpreted as bottom-up approaches, because you first model and respectively implement an artefact on the SAP HANA layer, and then call the existing SAP HANA artefact in ABAP. In ABAP releases below ABAP 7.4 SP02, or in scenarios with SAP HANA as secondary database, such calls always require using native SQL. Lesson: ABAP and SAP HANA © Copyright. All rights reserved. 23 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 32. Bottom-Up Approach with Proxy Objects Figure 26: Bottom-Up Approach with AS ABAP 7.4 ≥ SP02 Starting with ABAP 7.4 SP02, ABAP provides new repository objects to simplify the bottom- up approach. These new objects are created in the ABAP repository as representatives or Proxy Objects for the objects created on SAP HANA. Access to the proxy objects does not require the use of native SQL. You can use existing SAP HANA artefacts natively in ABAP by doing the following: ● Create so-called External Views in the ABAP Dictionary to represent native SAP HANA column views. ● Create so-called Database Procedure Proxies in the ABAP Dictionary to represent SAP HANA native database procedures. There is also a proxy object for SAP HANA Delivery Units, the so-called SAP HANA Transport Container. It helps to synchronize the otherwise separated lifecycle managements of ABAP objects and SAP HANA artefacts. Caution: Creating database procedure proxies is not recommended. It is covered in the course only in case you encounter such proxies in your ABAP system. Unit 1: Introduction 24 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 33. Top-Down-Approach for Code-to-Data Figure 27: Top-Down Approach with AS ABAP 7.4 ≥ SP05 Since Release 7.40 SP05, ABAP provides additional capabilities to support the code-to-data paradigm. This new approach can be called the top-down approach. Compared to the bottom-up approach, the ABAP stack manages all entities and deploys all artefacts from the ABAP layer into the database. Figure 28: Code-to-Data Capabilities as off ABAP 7.4 Using SAP HANA-specific features is improved by introducing a new concept called ABAP- Managed Database Procedures. A Database-oriented programming model is supported better through the following: ● An advanced Open SQL, supporting more of the SQL-92 standard Lesson: ABAP and SAP HANA © Copyright. All rights reserved. 25 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 34. ● New capabilities for defining views using a common set of domain-specific languages and services for defining and consuming semantically rich data models called Core Data Services Transparent Optimizations are improvements in the ABAP stack itself. Your code directly benefits from this without any adjustments. The following are examples of transparent optimizations: ● Fast Data Access, a new data exchange protocol between the ABAP stack and the database ● Optimizations of SELECT ... INTO ITAB and of SELECT SINGLE ● Optimizations of SELECT ... FOR ALL ENTRIES Performance Improvement Versus Code Adjustments Figure 29: Performance Improvement Versus Code Adjustments The different code-to-data options correlate with the potential gain in performance. However, the complexity of the resulting code may also increase the more code is moved to the database or made database-specific, as follows: ● Transparent optimizations in principle improve performance without any code adjustments. Some code adjustments may be necessary while migrating to SAP HANA, however, to profit from the adjustments. ● Using enhanced Open SQL and the advanced view definition capabilities, you can create new data models and consume them in ABAP, thereby improving the productivity and performance without database-specific artefacts. ● Using native database features may be necessary to achieve the best performance, but the code adjustment effort might increase. LESSON SUMMARY You should now be able to: ● Explain the SAP HANA and ABAP Evolution Unit 1: Introduction 26 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 35. ● Describe the various Code-to-Data Concepts ● Determine if HANA’s row store or column store is used for an ABAP transparent table, and which indices are used on HANA Lesson: ABAP and SAP HANA © Copyright. All rights reserved. 27 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 36. Unit 1 Lesson 4 Introducing the ABAP Development Tools (ADT) LESSON OVERVIEW As an open framework, Eclipse can host a whole range of development tools. As well as the SAP HANA Studio environment, SAP also provides a suite of tools known as the ABAP Development Tools. These enable you to develop ABAP resources using Eclipse as a front- end development environment. Business Example Your company has recognized SAP HANA as an important strategic topic and has asked you to refresh your ABAP skills, paying particular attention to those required to develop or review code that leverages the strengths of SAP HANA. LESSON OBJECTIVES After completing this lesson, you will be able to: ● Use the ABAP Development Tools in Eclipse Using ABAP Development Tools Figure 30: ABAP Development Tools for SAP NetWeaver – Architecture ABAP Development Tools provides the following: ● A brand new ABAP development experience on top of the Eclipse platform 28 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 37. ● An open platform for developing new ABAP-related tools ● A set of open, language and platform-independent APIs that developers can use to build new custom tools for the ABAP environment Benefits of Eclipse With ABAP Development Tools in Eclipse you benefit from the usability, speed, and flexibility of Eclipse, while also benefitting from proven ABAP Workbench features. ABAP Development Tools improves developer productivity by offering better refactoring functionality, code completion, auto-insertion, and code templates. It also includes an invaluable Quick Fix feature and is highly navigable. ABAP Development Tools allows you to connect to multiple ABAP systems and provides session failover, reducing the impact of lost connections. It also enables cross-platform development by integrating ABAP and non-ABAP development tools in a single, powerful integrated development environment (IDE). Note: In addition, ABAP Development Tools is tightly integrated with SAP HANA Studio, SAP UI5 tools, and Java. The architecture of ABAP Development Tools for SAP NetWeaver is an architecture designed for ease of use and flexibility. It is designed to allow developers to use a single Eclipse client, installed locally, that connects to several ABAP back-end systems of different releases using a Remote Function Call (RFC)/Representational State Transfer (REST)-based protocol. This allows developers to control all activities in a central location and helps avoid time- consuming context switches. The client provides a set of standard Eclipse development tools, such as the project explorer for system browsing and search views. When you use ABAP Development Tools, you log on to an SAP back-end system and work directly with its repository objects. In this sense, the development process is exactly the same as when you use the ABAP Workbench, in that there is no check-out and check-in of the objects. Each connection that you make is represented in Eclipse by an ABAP Project. An ABAP project serves as the container for the development objects that are stored in the particular ABAP back-end system containing the logon parameters for a particular system logon, such as the following: ● System ● Client ● User and language You must be logged on to the system in order to edit a particular resource. Within the project, you can access any development object in the Repository. However, to make it easier to manage the objects you use regularly, you can set up favorite packages for each project. Within the project, there is a navigation view similar to the one in the ABAP Workbench. The source library contains not only programs, but also classes, interfaces, and function modules, which you edit in a source code editor rather than in the traditional form-based mode. Lesson: Introducing the ABAP Development Tools (ADT) © Copyright. All rights reserved. 29 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 38. Note: You can create multiple ABAP projects in Eclipse, each related to a different system. Figure 31: ABAP Development Tools – Editors There are two kinds of editors in ABAP Development Tools – those for which there is a native Eclipse implementation and those that appear in-place in the SAP GUI. The figure, ABAP Development Tools – Editors, shows each kind – the ABAP Editor as an example of an Eclipse editor and the ABAP Dictionary showing how the classic SAP GUI visualization appears within the Eclipse environment. Generally speaking, there is no requirement to use ABAP Development Tools for ABAP development, and each developer is free to choose whether to use ABAP Development Tools or the classic ABAP Workbench. The functions and features of Eclipse in general and ABAP Development Tools in particular lend themselves particularly well to object-oriented programming, with various built-in refactoring functions and support for unit testing. There are other tasks to which the ABAP Workbench is better suited, in particular working with module pools and the Screen Painter. Some new functions, however, are only provided within ABAP Development Tools, and do not have an equivalent function in the ABAP Workbench. Several of these pertain to ABAP development for SAP HANA. Unit 1: Introduction 30 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 39. Working with ABAP Development Tools Figure 32: ABAP Project Figure 33: Native with Eclipse Look and Feel Lesson: Introducing the ABAP Development Tools (ADT) © Copyright. All rights reserved. 31 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 40. Figure 34: ABAP Development Tools Quick Reference Card ABAP Development Tools provides a large number of keyboard shortcuts that can make you more productive. You can download a quick reference card with the most important shortcuts from the following SCN page: http://scn.sap.com/community/abap/eclipse/blog/ 2012/07/02/adt-quick-reference-card . Examples of keyboard shortcuts ABAP developers new to ABAP Development Tools often do not find quickly are as follows: ● Shift + F1 to format the source code, that is, use the pretty printer ● Ctrl + < and Ctrl + > to turn a line of code into a comment or to remove a comment, or Ctrl + 7 to toggle between commenting/de-commenting a line ● F3 to navigate to the definition of the currently selected object (forward navigation). Pressing the Ctrl key while positioning the mouse over an object, such as a class or method name, adds a link and allows you to navigate to the definition or implementation of the object. Unit 1: Introduction 32 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 41. Figure 35: Editing Source Code The source code editor in ABAP Development Tools provides many helpful features, such as the following: ● Code completion, which includes keyword completion, using code templates for completion and Content Assist to suggest completions for variable names, method names, and so on, while typing. ● Quick Fix, which allows you to quickly resolve errors or warnings reported about the code. There are many quick fixes available for ABAP, such as the following: - Creating method implementations from the method definition - Creating method definitions from implementation parts - Creating implementation parts for interface methods - Creating method definitions from method calls - Creating ABAP classes or ABAP interfaces from the source code For a complete list, please check the documentation. Lesson: Introducing the ABAP Development Tools (ADT) © Copyright. All rights reserved. 33 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 42. Figure 36: Troubleshooting Tools – ABAP Debugger in Eclipse Debugging ABAP Code The latest ABAP debugger is completely integrated into the Eclipse debug framework. Although it is an ABAP debugger, it behaves like all other debuggers in Eclipse you might be familiar with because the look, feel, and functionality are all Eclipse. In other words, you can now debug your reports, transactions, classes, Web Dynpro applications, and so on, natively in Eclipse. The ABAP Debugger in the ABAP Development Tools can satisfy most of your debugging requirements. For special purposes – other than observing running code – you may still want to use the new ABAP Debugger in the SAP GUI. Note: The Run > Debug menu function in Eclipse is not enabled in the ABAP Perspective. You start the debugger by setting a breakpoint in your code and then running the ABAP program. You can start it directly with F8. The debugger offers, among other features, editing in the debugger. You can correct a bug when you find it. Debugging in the IDE is not supported if you are working with a 7.0 EHP3 back-end system. For more information, please find the latest information on the SAP Service Marketplace. Unit 1: Introduction 34 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 43. Figure 37: Information Sources If you want to get a local installation of the SAP Development Tools for Eclipse, there are several sources you can choose from, such as the following: ● The SAP Software Download Center: http://service.sap.com/swdc , part of the SAP Service Marketplace. ● The SAP Development Tools for Eclipse Web site: http://tools.hana.ondemand.com You can also find other products like the SAP HANA studio or the tools for SAP UI5 development via this site. It describes how to install or update the SAP Development Tools for Eclipse using the SAP Development Tools for Eclipse update Web site. Hint: For more information, see the following SAP Community Network pages: http:// scn.sap.com/community/abap/eclipse and http://scn.sap.com/community/ abap/hana . They provide documentation and support on how to install the SAP Development Tools for Eclipse. Lesson: Introducing the ABAP Development Tools (ADT) © Copyright. All rights reserved. 35 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 44. Figure 38: Installed Features The About item in the Help menu provides information about installed features and plugins. Figure 39: Installing and Updating Features The Check for Updates and Install New Software commands in the Help menu provide the ability to update existing features and to find, download, and install new features (provided you have configured suitable update sites in Eclipse). LESSON SUMMARY You should now be able to: ● Use the ABAP Development Tools in Eclipse Unit 1: Introduction 36 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 45. UNIT 2 Taking ABAP to SAP HANA Lesson 1 SAP HANA as Secondary Database– Access via Open SQL 38 Lesson 2 Static Code Checks to Prepare ABAP Code for SAP HANA 42 Lesson 3 Tools to Analyse Potential Performance Issues 49 Lesson 4 Guided Performance Analysis 54 Lesson 5 Performance Rules and Guidelines for SAP HANA 61 UNIT OBJECTIVES ● Describe how to access the SAP HANA database by using Open SQL and a secondary database connection ● Use Code Inspector and ABAP Test Cockpit ● Use the ABAP Trace (SAT) and the ABAP Profiling perspective to measure and compare runtime consumption ● Use SQL Trace (ST05) for in depth analysis of database accesses ● Use the SQL Monitor (SQLM) to identify the most important database access ● Use the Performance Tuning Worklist (SWLT) to combine static and dynamic performance analysis results ● Understand the performance rules and guidelines for ABAP on SAP HANA © Copyright. All rights reserved. 37 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 46. Unit 2 Lesson 1 SAP HANA as Secondary Database– Access via Open SQL LESSON OVERVIEW In this lesson, you learn how to access the SAP HANA database by using Open SQL and a secondary database connection. Business Example Your company has recognized SAP HANA as an important strategic topic and has asked you to refresh your ABAP skills, paying particular attention to those required to develop or review code that leverages the strengths of SAP HANA. LESSON OBJECTIVES After completing this lesson, you will be able to: ● Describe how to access the SAP HANA database by using Open SQL and a secondary database connection Secondary Database Connections Each Application Server ABAP is connected to a Database Management System (DBMS) that contains the ABAP Repository and the database tables and views defined in this system's ABAP Dictionary. This DBMS is referred to as its Primary Database. Aside from this primary database connection, it is possible to establish connections to additional database management systems or secondary database connections. In the scenario, SAP HANA as Accelerator, where SAP HANA is used as a secondary DBMS, it is necessary to establish such a secondary database connection to SAP HANA. Secondary database connections, among other things, are created and maintained via transaction DBACOCKPIT. Each database connection is identified by a name that must be unique within the application server. 38 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 47. Figure 40: Transaction DBACOCKPIT Figure 41: Database connection details Inside the connection, the DBMS is identified by a hostname and an instance number, which relates to an SQL port. Furthermore, a database user (with password) has to be maintained. Any access to the database via this secondary database connection is equivalent to a log on to the database with this user. Lesson: SAP HANA as Secondary Database– Access via Open SQL © Copyright. All rights reserved. 39 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 48. Access to a Secondary Database with Open SQL Once the secondary database connection is established, it is easy to use it in ABAP programs. Open SQL offers an additional CONNECTION, which has to be followed by the name of the secondary database connection. Figure 42: Open SQL Using Secondary Database Connection However, some restrictions apply when using Open SQL to access a secondary database. Figure 43: Open SQL over Secondary Database Connection – Restrictions Due to the syntax check for Open SQL statements, the tables and fields the statement refers to must exist in the ABAP Dictionary of the application server. This implies that objects only known to SAP HANA (such as SAP HANA views or procedures) are not accessible by Open SQL. Unit 2: Taking ABAP to SAP HANA 40 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 49. Note: We learn later in this course that in order to access these objects, either native SQL has to be used or new objects have to be created in the ABAP Dictionary that make the SAP HANA objects visible for the syntax check. Finally, Open SQL access to a secondary database is restricted to the default schema of the database user in the connection. Normally, the name of this schema is identical to the user name. LESSON SUMMARY You should now be able to: ● Describe how to access the SAP HANA database by using Open SQL and a secondary database connection Lesson: SAP HANA as Secondary Database– Access via Open SQL © Copyright. All rights reserved. 41 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 50. Unit 2 Lesson 2 Static Code Checks to Prepare ABAP Code for SAP HANA LESSON OVERVIEW This lesson introduces some tools to analyze potential functional and performance issues in ABAP programs when migrating to SAP HANA. Business Example You want to run existing ABAP code on SAP HANA. You heard of functional issues and performance problems that might occur. You want to analyze whether this is the case and what you can do to make your coding “SAP HANA-ready”. LESSON OBJECTIVES After completing this lesson, you will be able to: ● Use Code Inspector and ABAP Test Cockpit Considerations Before Migrating to SAP HANA Figure 44: Example: How you Should Not Access Data from the Database ABAP Developer’s Questions: SAP HANA Impact on Custom ABAP Code ● Which of my ABAP code must be changed to avoid potential functional issues when migrating to SAP HANA? ● Which of my ABAP code shall be optimized to ensure good performance? ● Which of my main business processes have potential for SAP HANA so that I can speed those up massively? ● How can I find all this ABAP code easily and do the adaption efficiently? 42 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 51. Most likely, you use SAP HANA because you want to improve the performance of your ABAP applications. If you consider fully migrating to SAP HANA, you may also ask how to prepare your ABAP code to avoid functional issues after the migration, and to what extent you have to rewrite ABAP code. SAP tools and guidelines help with these issues, and enable you to get your custom code ready and optimized for SAP HANA. Table 1: Migrating to SAP HANA: Affect on Existing DB-Specific ABAP Code Technical Change Details and Examples: Affect on Database-Specific ABAP Code Database migration Each DB has specific features and unique technical behavior. DB- specific code may rely on these features of the database used. SAP HANA architec- ture Column based architecture – as a consequence, for example, secon- dary DB indexes are less important. DB-specific code may rely on the existence or usage of certain DB indexes. Depooling/declus- tering During the migration to SAP HANA, most pool and cluster DB tables are transformed to transparent DB tables so that the tables can be used in analytical scenarios. DB specific code may rely on the techni- cal specifics of pool and cluster tables. For more information about the details, see OSS note 1785057. Migrating to SAP HANA is similar to other database migrations, as some technical changes may affect existing ABAP coding. In general, however, no changes are necessary if your SQL code follows the golden Open SQL rules. Use static checks to find SQL patterns that violate the rules of Open SQL. Potential Functional Issues Figure 45: Avoiding Potential Functional Issues: Examples of Mandatory Adaptations Standard ABAP code is fully portable between different database types. However, it is also possible to use database-specific features explicitly or implicitly. In such situations, the code has to be revisited when migrating to SAP HANA. Some concrete scenarios are as follows: Lesson: Static Code Checks to Prepare ABAP Code for SAP HANA © Copyright. All rights reserved. 43 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 52. ● If ABAP code uses native SQL (for example, via ADBC or EXEC SQL), this code must be checked and adapted. The ADBC example in the figure, Avoiding Potential Functional Issues: Examples of Mandatory Adaptations, uses the proprietary ROWNUM pseudo column offered by some databases as an iterator to count over a result set. As this is not supported in this form in the SQL dialect of SAP HANA, this coding needs to be adapted. ● A second example are hints to the database, respectively the database interface. These enable optimization of query execution for specific databases. In the example shown in the figure, Avoiding Potential Functional Issues: Examples of Mandatory Adaptations, a specific behavior for treating the FOR ALL ENTRIES clause is defined for Microsoft SQL Server. Such hints are ignored after a database migration, for example, to SAP HANA. In general, it should be checked if a hint is still needed for the target database. In almost all cases, the default behavior of SAP HANA should be sufficient. Figure 46: Avoiding Potential Functional Issues: Examples for Mandatory Adaptations There are more subtle scenarios. Although Open SQL is database-independent, it is possible to rely on unspecified behavior or internals. For instance, when using SELECT to select data, the result is not sorted unless explicit sort criteria are defined using the ORDER BY clause. However, a certain sorting can be observed for some databases (for example, by primary key or a specific secondary key), which existing code may rely on mistakenly. There is no guarantee that subtle problems will not arise after database migration, for example, when accessing the result table via a READ TABLE statement, using BINARY SEARCH assuming a sorted table. Whenever selected data which must be sorted, the ORDER BY clause must be used (independently of SAP HANA). This also applies to the special case of pool/cluster tables, which are transformed into transparent tables on SAP HANA. More unusual scenarios can include when the physical clusters and pool are accessed, or the program code depends explicitly on the existence of indices. Such cases must also be checked and most likely adapted after migration. Performance Considerations Transitioning ABAP Code to SAP HANA – Performance Considerations ● Performance of existing ABAP code after a migration Unit 2: Taking ABAP to SAP HANA 44 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 53. - Some code immediately runs faster. - Some code might be negatively impacted and should be revisited. ● Reminder of performance guidelines - Classical performance recommendations for Open SQL remain valid. - Some shift priorities, for example, nested selects (higher), indices (lower). Existing ABAP code that followed the classical performance recommendations has a good chance of immediately benefiting from SAP HANA. In addition to enabling an existing component, a central goal of SAP HANA is to accelerate performance and to fully benefit from HANA. In many situations, existing ABAP code might run faster immediately after a migration to HANA. However, there can also be situations in which existing code is negatively impacted, especially if the classical performance recommendations were not taken into account. In general, well- written ABAP code has a good chance of running better immediately on SAP HANA. Code Inspector and ABAP Test Cockpit Before migrating to SAP HANA, a static code analysis should be performed to identify functional issues and potential impairments of performance. Figure 47: ABAP Code Inspector With the ABAP Code Inspector you can perform a whole range of static functional and performance checks. Of course, the ABAP Code Inspector has been in use long before SAP HANA and most of the checks are not SAP HANA specific. The rules and guidelines checked by them are also valid for any database. Lesson: Static Code Checks to Prepare ABAP Code for SAP HANA © Copyright. All rights reserved. 45 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 54. However, since SAP NetWeaver 7.40, SAP continuously extended the range of available checks, and some of the new checks are particularly important with regard to SAP HANA (although they are valid for other databases too). Many of these checks have been downported into lower releases. Code Inspector Checks to Search for Potential Functional Issues Critical Statements Search for DB Hints and Native SQL Search DB Operations in Pool/Cluster Tables Search for direct accesses to table pools and table clusters Search problematic statements for result of SELECT/OpenCursor without ORDER BY Search for statements that rely on implicit sorting Code Inspector Checks to Search for Potential Performance Issues Search problematic SELECT * statements Search for SELECT * statements where less than a certain percentage of the fields are used later on Search DB operations in loops across modularization units Search for repeated identical selects Search SELECT .. FOR ALL ENTRIES-clauses to be transformed Search for SELECT statements with FOR ALL ENTRIES that can be replaced by a SELECT statement with a join All these checks have documentation available describing how the check works, and the meaning of the check parameters that can be maintained. When creating a check variant, including the new checks, remember to check the parameters, and if necessary, change them. The check parameters are documented if you are not sure what they represent. For example, you can check for problematic SELECT * statements. This statement in particular has several check parameters. This check searches for SELECT * FROM dbtab statements, in which less than a specified percentage of the fields are effectively used. The default value for the percentage is 20%. If less than 20% of the fields are used, it is more efficient to select only the used fields. The value of this parameter depends largely on the database used. When on a database with a column store, such as SAP HANA, this value should be set to a higher value than on a traditional, row store-only database. Inspection Results The figure, Code Inspector – Inspection Results, shows an example of the inspection result, where two of the new checks have resulted in an error message. Remember, you can double- click the message to navigate to the problem code. Unit 2: Taking ABAP to SAP HANA 46 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 55. Figure 48: Code Inspector – Inspection Results Code Inspector As a Part of ABAP Test Cockpit (ATC) Figure 49: ABAP Test Cockpit With ABAP 7.02, ABAP Test Cockpit (ATC) was introduced as a holistic quality assurance tool. The ATC integrates the code inspector, including the configuration of Code Inspector check variants. Compared to the stand-alone Code Inspector, ATC offers the following additional functions: ● Flexible scheduling of check runs ● Distribution of results ● General support for quality management processes Lesson: Static Code Checks to Prepare ABAP Code for SAP HANA © Copyright. All rights reserved. 47 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 56. ATC is available in SAP GUI (transaction code ATC) but it is also integrated into ABAP Development Tools and into SAP Solution Manager. The checks performed by the ATC can be configured. The standard configuration reuses the ABAP Code Inspector checks, with check variant DEFAULT. The check variant used may have to be adjusted to make sure all checks relevant to SAP HANA are performed. LESSON SUMMARY You should now be able to: ● Use Code Inspector and ABAP Test Cockpit Unit 2: Taking ABAP to SAP HANA 48 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 57. Unit 2 Lesson 3 Tools to Analyse Potential Performance Issues LESSON OBJECTIVES After completing this lesson, you will be able to: ● Use the ABAP Trace (SAT) and the ABAP Profiling perspective to measure and compare runtime consumption ● Use SQL Trace (ST05) for in depth analysis of database accesses Runtime Analysis Before starting to optimize ABAP code detected with Code Inspector or ABAP Test Cockpit, you may have to perform a detailed Runtime analysis to better understand the origin of the performance issue. Runtime Analysis in the ABAP Workbench Figure 50: Runtime Analysis: ABAP Trace One of the tools to perform such a runtime analysis in the classical SAP GUI is the ABAP Trace (transaction code SAT), which replaces the older Runtime Analysis ( SE30). Runtime Analysis and ABAP Trace have the following characteristics: ● The functions of the classic Runtime Analysis ( SE30) and the new ABAP Trace ( SAT) can be completely used in the SAP HANA context. © Copyright. All rights reserved. 49 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 58. ● Both tools measure runtime of processing blocks (methods, functions, and subroutines) or single statements. ● No database-specific functions are available. Runtime Analysis in ABAP Development Tools Figure 51: Runtime Analysis: ABAP Profiling Perspective in ABAP Development Tools When using the ABAP Development Tools in Eclipse, an alternative to using the SAP GUI- based ABAP Trace is to use a dedicated perspective in ABAP Development Tools, called the ABAP Profiling Perspective. With this perspective, you can also create ABAP traces. The trace files are the same as those created using the ABAP trace, which means that a trace created using any of the two tools can also be analyzed in the other tool. Depending on which configuration is used to generate a trace, the ABAP Profiling perspective provides different views, including the following: ● An overview that shows, for example, which percentage of the execution time was spent in ABAP, and which percentage on the database ● A hit list of the most time-consuming programs or methods ● Database accesses ● An ABAP Trace Call Tree view to analyze the execution path of a program. You can use the call tree to do the following: - Analyze the flow of a program as part of the analysis of an error. You can see which ABAP programs are involved in the error and easily find useful places to set breakpoints. - Understand how an unfamiliar program works and which ABAP programs play a role in its execution. ● A Call Timeline view, which visualizes the trace events and time consumed in the form of a diagram. In general, information shown in this graphical view corresponds to the one in the Unit 2: Taking ABAP to SAP HANA 50 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 59. Call Tree view. The horizontal axis of the diagram displays the temporal sequence of each trace event measured, whereas the vertical axis represents the call depth within a call hierarchy. In contrast to the Call Tree, the trace events are represented not as discrete tree nodes, but as a continuous sequence. The advantage lies in the graphical representation and a quick detection of eye-catching patterns. Call Tree and Call Timeline are only shown if the call tree was created when tracing (no aggregated measurement). In-Depth Analysis of Performance Issues Before starting to optimize ABAP code detected with Code Inspector or ABAP Test Cockpit, you may have to perform a detailed SQL analysis to better understand the origin of the performance issue. Figure 52: Runtime Analysis: SQL Trace Uses of SQL Trace (ST05) ● Display record of all database access (including SQL calls over a secondary database connection) ● Detect redundant or identical SELECT statements ● Locate database-related performance issues ● Display database execution plan for statements Another tool for runtime performance analysis is the SQL Trace ( ST05). This tool in particular analyses database accesses. It can be used for a deeper analysis once an analysis with the ABAP Trace or the ABAP Profiling Perspective indicates that database access could be the cause of the performance issues. Lesson: Tools to Analyse Potential Performance Issues © Copyright. All rights reserved. 51 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 60. Figure 53: Performance Trace Figure 54: Execution Plan Hint: Note that the Explain function in the SQL Trace is database-specific. Hence, a database execution plan looks different for each database platform supported by SAP. Unit 2: Taking ABAP to SAP HANA 52 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 61. LESSON SUMMARY You should now be able to: ● Use the ABAP Trace (SAT) and the ABAP Profiling perspective to measure and compare runtime consumption ● Use SQL Trace (ST05) for in depth analysis of database accesses Lesson: Tools to Analyse Potential Performance Issues © Copyright. All rights reserved. 53 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 62. Unit 2 Lesson 4 Guided Performance Analysis LESSON OVERVIEW In this lesson, you learn how to use the SQL Monitor ( SQLM) to identify the most important database access, use the Performance Tuning Worklist ( SWLT) to combine static and dynamic performance analysis results, and use SQL Trace ( ST05) for in-depth analysis of database accesses. Business Example Your company has recognized SAP HANA as an important strategic topic and has asked you to refresh your ABAP skills, paying particular attention to those required to develop or review code that leverages the strengths of SAP HANA. LESSON OBJECTIVES After completing this lesson, you will be able to: ● Use the SQL Monitor (SQLM) to identify the most important database access ● Use the Performance Tuning Worklist (SWLT) to combine static and dynamic performance analysis results Best Practice when Transitioning ABAP Code for SAP HANA Instead of analyzing each ABAP program individually, a good practice when transitioning and optimizing ABAP applications to SAP HANA is to follow a three-step approach. Figure 55: Steps to Transition ABAP Code for HANA 54 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 63. The first step is to detect those places where performance can or should be improved, and to analyze and prioritize the findings based on the importance of the places detected. The next step is to optimize the existing code, using the prioritized list. An optional last step is to use SAP HANA’s new features to redesign and innovate your business processes. Guided Performance Optimization Figure 56: Steps of the Guided Performance Optimization The first two steps are supported by several tools, which in total result in a guided performance optimization procedure, as follows: ● Static code check tools such as Code Inspector and ABAP Test Cockpit (ATC) to find pieces of code using known critical constructs, such as deviations from the classical performance recommendations ● Tools analyzing performance at runtime, to determine if critical constructs really cause issues at runtime, for example, the ABAP Trace ● A new tool called SQL Monitor to determine the priority if different programs access the database intensively ● A new tool called SQL Performance Tuning Worklist, which combines the results of static and runtime analyses to create a prioritized worklist Lesson: Guided Performance Analysis © Copyright. All rights reserved. 55 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 64. Determining an ABAP System's SQL Profile: SQL Monitor Figure 57: New ABAP SQL Monitor The new SQL Monitor is a powerful tool for capturing the SQL profile of a system or transaction. SQL profile refers to aggregated data about all SQL requests executed in the context of a certain business process, application, and so on. This includes how often each request is executed, which tables are accessed, the total runtime, how many records are fetched, and more. The SQL Monitor is a new development with ABAP 7.4. However, in order to support its use before a migration, it is also offered as part of the so-called ST-PI support Add-On provided by SAP Active Global Support. Figure 58: The New ABAP SQL Monitor – Architecture A central design goal was to ensure that the SQL Monitor can run in the productive environment because this is where the real SQL profile of an application can be observed. The Unit 2: Taking ABAP to SAP HANA 56 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 65. SQL Monitor introduces only a minimal performance overhead and all data collection is done asynchronously without additional database interaction affecting the runtime of the actual business processes. When the SQL Monitor is enabled, the ABAP kernel logs information about database accesses (for example, transaction, source code position, accessed tables, and so on) using the runtime monitor infrastructure (file based). This data is transferred periodically to the SQL Monitor database tables (every 24 hours, with manual refresh possible). The transfer is required for data analysis and to store the results permanently. The SQL Monitor provides a dedicated transaction for displaying and analyzing the data, which in turn reads from the respective database tables containing the collected data. Figure 59: Switching the SQL Monitor on and Viewing SQL Monitor Data After the initial setup of the SQL Monitor, you can activate or deactivate the monitor via transaction SQLM. When you launch it, it displays the current status. You can activate it for all application servers or for specific application servers. You can also specify an expiration date and an upper limit for the number of records. After data has been collected, you can view the collected SQL profile either by navigating from transaction SQLM or by launching transaction SQLMD. You can specify a number of filter criteria. For instance, you can filter by development objects, such as package, object type, and name, or by request (transaction VA01, Web Dynpro Application <ABC>), and the respective request type (for example, URL, RFC, report). You can also define a filter for looking into accesses to concrete database tables. You can select a certain aggregation type and a sorting of the result list. Lesson: Guided Performance Analysis © Copyright. All rights reserved. 57 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 66. Figure 60: Exporting and Importing SQL Monitor Snapshots Exporting and Importing SQL Monitor Snapshots ● Transaction SQLM offers a simple management of SQL Monitor snapshots. ● Snapshots can be as follows: - Created based on local data - Imported from a file (for example, from other systems) - Exported to a file - Removed ● To reduce data volume, basic filter criteria can be applied before snapshot creation. As the SQL Monitor should collect data in a productive system, and the code optimizations are usually planned in another system, such as a development system or sandbox environment, it is desirable to be able to export and import the collected data. The SQL Monitor supports exporting and importing snapshot data for this purpose. These tasks can also be performed using the SQLM transaction. Note that the exported data can also be analyzed via other tools, such as a SAP Lumira, allowing visualizations and more complex analytical operations. Unit 2: Taking ABAP to SAP HANA 58 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 67. Creating a Prioritized Worklist Figure 61: SQL Performance Tuning Worklist – Motivation For performance optimization, combine the results of both static source code analysis (carried out via the ATP or Code Inspector) and the SQL Monitor runtime data. This correlation can be done in another new tool, the SQL Performance Tuning Worklist. This tools can be used to create a ranking based on the cost and benefit of a potential optimization. Figure 62: SQL Performance Tuning Worklist – Usage LESSON SUMMARY You should now be able to: ● Use the SQL Monitor (SQLM) to identify the most important database access Lesson: Guided Performance Analysis © Copyright. All rights reserved. 59 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 68. ● Use the Performance Tuning Worklist (SWLT) to combine static and dynamic performance analysis results Unit 2: Taking ABAP to SAP HANA 60 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 69. Unit 2 Lesson 5 Performance Rules and Guidelines for SAP HANA LESSON OVERVIEW In this lesson, you learn about the performance rules and guidelines for ABAP on SAP HANA. Business Example Your company has recognized SAP HANA as an important strategic topic and has asked you to refresh your ABAP skills, paying particular attention to those required to develop or review code that leverages the strengths of SAP HANA. LESSON OBJECTIVES After completing this lesson, you will be able to: ● Understand the performance rules and guidelines for ABAP on SAP HANA Performance Guidelines for ABAP on SAP HANA The classic performance guidelines for using Open SQL and for ABAP programming essentially remain vaild. These guidelines can be called the five golden rules. Figure 63: Golden Rules for Open SQL The five golden rules are as follows: ● Keep the result set small © Copyright. All rights reserved. 61 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 70. This reduces both the amount of memory used in the database system and the network load when transferring data to the application server. To reduce the size of your result sets, use the WHERE and HAVING clauses. ● Minimize the amount of data transferred To only transfer the columns you really need, use SELECT with a field list, instead of SELECT *. ● Minimize the number of database accesses On all database systems, there is a small performance overhead associated with every request for connection handling, SQL parsing, execution plan determination, and so on. Avoiding such frequent single database requests is more important on SAP HANA. You can, therefore, minimize the load on the network and the database system by minimizing the number of times you access the database. Use JOINs and/or sub-queries instead of nested SELECT loops. Do not retrieve unnecessary data from the database by selecting any of the following: - Minimal number of rows - Minimal number of columns - Minimal number of database interactions ● Minimize the search overhead Minimize the size of the result set by using the WHERE and HAVING clauses. To increase the efficiency of these clauses, formulate them to fit with the database table indexes. ● Reduce the database load Unlike application servers and presentation servers, there is only one database server in your system. Therefore, you should still aim to reduce the database load as much as possible. Use the following methods: avoid reading data redundantly, use table buffering (if applicable) and do not bypass it, and sort data in your ABAP programs. Figure 64: Guidelines that Become More Important Some guidelines become even more important with SAP HANA. Unit 2: Taking ABAP to SAP HANA 62 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 71. Keep the result set small and reduce the amount of data transferred, as follows: ● Do not retrieve rows and discard them later using CHECK or EXIT statements, for example, in loops. ● The more fields you use in the field list, the more columns have to be unpacked. This unpacking and reconstruction of rows is more expensive on a column store than on a row store. Reduce the number of database accesses, as follows: ● Use mass processing wherever possible. ● All rows and columns that are needed should be selected in one SQL statement (avoid nested SELECTs and SELECTs in loops). Use SELECT … FOR ALL ENTRIES instead of lots of SELECTs or SELECT SINGLEs. Use array variants of INSERT, UPDATE, MODIFY, and DELETE. Figure 65: Guidelines that are Changed New guidelines are as follows: ● A WHERE clause containing non-indexed fields is not bad when executed on SAP HANA – the in-memory full table scan is fast. To reduce main memory consumption and to improve insert performance, most existing non-unique secondary database indices on columnar tables can be removed. ● Calculation and aggregation in the database are efficient. On SAP HANA, it is beneficial to move data-intensive calculations into the database. Nevertheless, executing the same operations redundantly is not recommended. LESSON SUMMARY You should now be able to: ● Understand the performance rules and guidelines for ABAP on SAP HANA Lesson: Performance Rules and Guidelines for SAP HANA © Copyright. All rights reserved. 63 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 72. Unit 2: Taking ABAP to SAP HANA 64 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 73. UNIT 3 Database Independent Code-to- Data Lesson 1 Classical Open SQL and Its Limitations 67 Lesson 2 Enhanced Open SQL 72 Lesson 3 Core Data Services in ABAP 77 Lesson 4 Associations in Core Data Services 88 Lesson 5 Core Data Services with Input Parameters 93 Lesson 6 Incorporating Authorization Checks with CDS 99 UNIT OBJECTIVES ● Explain Open SQL in the context of SAP HANA ● Know the limitations of classical Open SQL ● Features of Enhanced Open SQL ● Use the new Open SQL syntax for simple SELECT statements ● Use expressions in Open SQL SELECT statements ● Define database views using Core Data Services (CDS) in ABAP ● Use expressions, joins, aggregations, grouping and filtering in CDS views ● Use of union in CDS views ● Use Open SQL to select data based on CDS views © Copyright. All rights reserved. 65 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 74. ● Enhance a CDS view ● Use associations in Core Data Services ● Define CDS views in ABAP with scalar input parameters ● Use CDS Views with input parameters in other CDS views and in Open SQL ● Declare instance-based access permissions to CDS entities in ABAP using the Data Control Language (DCL) of CDS Unit 3: Database Independent Code-to-Data 66 © Copyright. All rights reserved. For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
  • 75. Unit 3 Lesson 1 Classical Open SQL and Its Limitations LESSON OVERVIEW In this lesson you learn about the limitations of classical Open SQL and why it can only be used to a limited extent to follow the code-to-data paradigm and benefit from the potential of SAP HANA. Business Example Your company ITeLO wants you to improve the performance of some ABAP applications considerably by making use of SAP HANA, installed as a secondary database side-by-side with the ABAP system. LESSON OBJECTIVES After completing this lesson, you will be able to: ● Explain Open SQL in the context of SAP HANA ● Know the limitations of classical Open SQL The Code-to-Data Paradigm Figure 66: Code-to-Data Paradigm To make ABAP code truly benefit from the potential of SAP HANA, a paradigm shift is necessary. Today's applications execute many data-intensive operations on the application server. High-performance applications delegate data intensive operations to the SAP HANA layer, such that they really profit from how SAP HANA can make use of parallelism and optimized data storage and transfer on the database server. The new paradigm, therefore, is Code-to-data instead of the old way, data-to-code. © Copyright. All rights reserved. 67 For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com