Things To Know ABAP Coding
Things To Know ABAP Coding
SAP’s programming language, ABAP, has played a large role in the software giant’s success over the years.
Many developers will recall their first ABAP program, run on R/3 or ERP, with fondness. With the advent of SAP HANA and SA
may need to be moved to the new suite.
A basic rule is that ABAP applications are fully compatible with SAP HANA. However, there a
HANA. Let’s take a look at each.
Take, for example, Native SQL via the EXEC SQL statement, the ABAP Database Connectivity
the code must be checked. While database hints are no longer executed on the new platform
is always required for database-dependent SQL because errors may occur here unless you in
Hints to the database (or also the database interface [DBI]) are given a database indicator in
%_HINTS <DB> 'db_specific_hint'.
The hint is sent only to the database specified instead of the <DB> placeholder. This means
the old database platform is converted to the new platform, it’s no longer sent to the optim
the database but also specific instructions to the DBI.
For a conversion, you must thus check whether the desired behavior on the old database pla
database platform. This is generally unnecessary for SAP HANA due to the modified architec
the DBI, either. Here, we recommend that you use the default values for SAP HANA for the D
You must always check database-dependent code for a conversion, even if standard SQL is
what the code is to achieve. An SQL statement must then be written to deliver the same resu
for this.
For pool and cluster tables, the DBI always performs an implicit sorting. This is lost after the
ORDER BY is added here to the statement. Therefore, access to pool and cluster tables must
migration. In this case, the Code Inspector provides a separate check—Find Select for Pool/C
easily find such critical points in your own developments.
Sort Behavior
If no ORDER BY was specified in the SQL statement, the sequence in which the records are r
However, changes can also occur in the implicit sort behavior for existing transparent tables
a primary or secondary index. Here, the data are often read in the desired sequence because
there when you use an index.
However, this isn’t guaranteed, and this behavior isn’t a documented feature of Open SQL. T
thus change at any time. You must use the ORDER BY addition instead if the data is to be se
to SAP HANA because the data are column-oriented, there is no secondary index, and the d
Thus, such places involve a programming error that you should correct regardless of a migr
check monitor (Transaction SRTCM) provide separate checks.
Problems may occur if a certain sorting is assumed in program sequences. This is the case, f
tables with the BINARY SEARCH addition because a relevant sorting is essential there. Howe
it’s suddenly not appearing in the desired sort order.
One last note: If you require a specific sorting of data when you access a database, use the O
Conclusion
Running ABAP on SAP HANA can seem tricky at first, but with the three tips outlined above,
migrating and checking code for consistency and errors.
SAP HANA features
1
i. Database Services
An in-memory database which provides real-time transactional as well as analytical processing in high-speed i.e. both OLTP and
SAP HANA is fully ACID compliant. This means that the in-memory database of SAP HANA has guaranteed, secure and reliable
transactions. ACID stands for Atomicity, Consistency, Isolation, and Durability.
Columns and partitions organise for the data stores in-memory. Data parallelly process from the memory and distributed to diff
quickly.
Multitenancy of databases is available that is, you can use more than one tenant database together as a single database and man
individually as well.
Multi-tier storage in the database allows the user to store data both in in-memory storage or in a disk (in columnar format).
In SAP HANA, applications easily developed using different tools and deployed either on-premise or on a cloud.
SAP HANA has an extended application development service which is a built-in web server using which you can create apps to a
amounts of data online. For developing such applications, you can use development tools like Apache Maven, GitHub, Git etc. SA
supports programming languages used in app development such as JavaScript, Python, JSON, OData, Java, Node.J
language etc.
You can also develop responsive web applications. This SAP HANA feature based on the HTML5 and JavaScript framework like
Web-based application development tools are used like the SAP Web IDE, SAP HANA Studio, SAP PowerDesigner, SAP Enterpr
Designer etc for data managing, data modeling, administering the database and developing applications.
Integrated application lifecycle management, one of SAP HANA features which manage the applications in building and packagi
development, testing, production, deployment and upgrading. Thus, completing a lifecycle of the application.
vii. Multi-Engines
SAP HANA provides a multi-engine query processing environment where different queries like textual queries, SQL queries for r
graph queries etc.
It is known for its breakthrough in-memory concept that it works on. Along with it, there
are many other unique benefits of SAP HANA given below.
Database Services
Analytics and Data Processing
Application Development and Deployment
Data Access, Integration and Quality
Administration and IT Operations
Security
Multi-Engines
Let’s explore every SAP HANA features, one by one:
The data from the internet of things and sensors is also processed and analysed in SAP HANA. This call as analysing series data
We can do text analysis with the help of advances text algorithms used for text-mining. In SAP HANA, advanced level text
analysis is done by recognizing natural-languages, subject, object, verb and doing sentiment analysis through analyzing text.
Data from various sources access from or integrate into SAP HANA for analysis. The data can access and integrate either as real-
The data quality improves by the data cleansing. For instance, cleansing a sample of geospatial data includes removing
unnecessary information from the data like names, phone numbers, street name, address, e-mail etc. Data cleansing enriches
the data by improving its quality.
The Apache Hadoop and Apache Spark integration are done by the virtue of applications like SAP Vora engine, SAP cloud
platform, a big data engine, Apache Hive, Big data services, and Apache Spark adapters.
vi. Security
Security of the data in SAP HANA ensures by security approaches like single sign-on and authorization. Kerberos protocol
and security assertion mark-up language (SAML) use to achieve this. All the important security aspects manage in the
security section of the DBA Cockpit. Security of the data ensures by providing complete data encryption, data auditing,
securing application services, data storage and communications.
Disaster recovery will ensure in SAP HANA by native as well as third party tools. Processes used to backing-up and recovery
of data if lost are mirroring, storage, backup, synchronous and asynchronous data replication etc. Using the recovery features
in SAP HANA, you can keep your system at standby in various area ranges like a local campus, a city or a remote location.
Conclusion
Thus, from this tutorial, we can say that SAP HANA is a very powerful technology with these numerous unique features.
Each feature adds effectively to the other features and makes SAP HANA a complete and advanced data analysis and
management tool.
Code to Data Paradigm
SAP HANA was introduced in 2010 as an in-memory database, capable of running data operations at the database level, rather t
platform with tools and technologies that offer application, integration, database, and analytical services.
As an ABAP developer, you should carefully consider your approach to designing business applications that run on SAP HANA. A
features and capabilities bring the most benefit to your applications.
The use of these SAP HANA-specific features requires a change in the way applications are designed and implemented. This stru
HANA platform is referred to as the code-to-data paradigm.
The traditional programming approach encouraged developers to keep loads away from the database layer. Applications were de
complex calculations and operations were then performed on the internal tables in the application layer. This recommendation i
database hardware is not capable of processing massive data in real time. This also leads to performance issues, as data retrieval
However, with an in-memory database like SAP HANA, the recommendation to move the code away from the database becomes
more of the load of expensive calculation, data processing, and mathematical operations to the database layer, since SAP HANA’
process data in real time.
For the greatest performance, a developer’s goal should be to bring back only the required details to the application server, rathe
data and then calculating the details in ABAP.
The code-to-data paradigm inspires application developers to use SAP HANA-specific features and capabilities that assist in des
processing. The application logic required to perform complex data operations such as calculation, aggregation, and text process
implementing one of the many techniques available. The availability of specific techniques depends on the SAP NetWeaver or AB
ABAP programming for SAP HANA is different from traditional ABAP programming. We published ABAP Development for SAP
Begin with an introduction to SAP HANA and its development environment and tools. Then learn about the code-to-data paradi
for SAP HANA databases.
Dive into backend ABAP programming for SAP HANA and learn how to get read-write access to the database using ABAP databa
Perform runtime analysis to ensure applications are working efficiently and explore the SAP Business Technology Platform, ABA
Wrap up with details on general programming guidelines for ABAP development and guidance for migrating code to SAP HANA
What does ‘Push down’ means?
We’ve learned that SAP HANA is not just a classical database, but it can
also perform calculations, search text, and data intensive operations.
Normally, all the intensive calculations are done in the Application Layer (AS ABAP).
You request all data from the database, and the database process your request and returns data.
With SAP HANA, you can perform intensive calculations on the data layer.
Coding in a way where you tell the data layer to perform the intensive calculations, or pushing down the code to the
data layer.
The first thing we understand about SAP HANA is that with advanced hardware capabilities the programming
model can accommodate data processing at the database level. This means all data processing developers used to do
in SAP by pulling data to the application layer from the database layer can be done in the database layer. So, instead
of pulling data, we are pushing computational code to the database layer. This brings us to the big question – Is
HANA capable of handling computations? The answer, fortunately, is Yes.
One of the direct impacts of the processing data in HANA is quick processing. Since data transfer from the database
layer to the application layer is no longer needed, heavy volume data transfer is replaced by transfer of only the
resulting set. This can effectively be achieved by using joins. The impact is even more pronounced in case of
aggregate and grouping functions. Example, in order to get prices of all the invoices, instead of pulling all items to
AS, an aggregate function SUM() can be used instead. This feature enables real-time analytics which has found
great utility in many domains.
While there are great advantages, it comes at a cost. First, from the development perspective, it is trickier for a
developer to handle both HANA and AS and ensure that there are no conflicts. This needs a careful navigation
through the development lifecycle till object settles in Production. This warrants a cautious approach in handling.
However, the upside is significant. Consider a report that is built upon data present in a dozen tables with
significant transactional data. This report’s performance can be improved by miles by implementing this new
approach. That is why, when ABAP Optimization comes into the picture – Code-To-Data paradigm (code-
pushdown) – is one of the first things development teams address.
ABAP Core Data Services ( CDS ) views
3
https://blogs.sap.com/2017/09/09/abap-core-data-services-introduction-abap-cds-view/
https://www.youtube.com/watch?v=0eXR-2mgEVs
CDS PDF
CDS DOC
AMDP can be created in an eclipse-based development environment. SQL Script is a database language tha
inside the AMDP method, you can consume it in ABAP report. SQL Script syntax check and debugging are
https://www.youtube.com/watch?v=abGS4GDI7tI
https://blogs.sap.com/2021/10/26/abap-managed-database-procedure/#:~:text=AMDP%20can%20be%20created%20in,also%
ABAP Database Conectivity ( ADBC )
ADBC stands for ABAP Database Connectivity in ABAP for SAP HANA. ADBC isused to run SAP HANA based queries directly usin
APIs to call queries using a simple interface.
https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenadbc.htm