0% found this document useful (0 votes)
24 views12 pages

ABAP Migration To S - 4HANA - First Questions - SAP Blogs

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 12

2/12/22, 9:02 AM ABAP Migration to S/4HANA – First Questions | SAP Blogs

Community

Ask a Question Write a Blog Post Login

Technical Articles

Jorge Augusto Portilla Garcia


March 6, 2020 | 6 minute read

ABAP Migration to S/4HANA – First


Questions

Follow  13  18  4,809

An approach that S/4HANA means for many people is like the ECC with a
 Like renewed “super-body“. Then, We can now quote the Bernoulli’s epitaph: “Eadem
mutata resurgo” (Although changed, I rise again the same).

 RSS Feed The Migration/Conversion to S/4HANA is a very interesting topic to ABAP for
HANA Developers and this article is a general presentation of some of the ABAP
fundamentals and tools that are available. In this sense, it can be useful for those
ABAP Developers who need an introduction to the new resources available within
HANA and some basic examples.

The knowledge that I may have acquired to write this blog comes mainly from
reading and studying the handbook “HA400” from the SAP Learning Hub and
also of my own experience. In this process and without any more preambles I
allow myself to present a question and also I could give an answer to it:

All ABAP custom code goes faster?


In fact, some custom code can go faster, but others go slower. The code that
respects the classic principles of good practices will go faster (plus a change of
priorities). The code that not consider these good practices eventually goes as
slow as before. In this sense, the Bernoulli’s epitaph may gain some relevance
because something from the past must be preserved.

In general, “FOR ALL ENTRIES” sentences are automatically improved within


S/4HANA. However, the rules of use remain (table pivot sorted and not empty).
For example:
https://blogs.sap.com/2020/03/06/abap-migration-to-s-4hana-first-questions/ 1/12
2/12/22, 9:02 AM ABAP Migration to S/4HANA – First Questions | SAP Blogs

IF lit_but000 IS NOT INITIAL.


SORT lit_but000 BY partner ASCENDING.
SELECT partner, name_first
INTO TABLE @DATA(lt_but000)
FROM but000
FOR ALL ENTRIES IN @lit_but000
WHERE partner = @git_but000-partner .
ENDIF.

The most important rules that stay valid and represent a change of priorities
within classical principles of good practices are:

Bring only the necessary fields from the database tables: Whenever possible
use the field’s list instead asterisk (*) with the SELECT statement.
Avoid making redundant access to the database: For example, avoid the use of
nested SELECT within LOOPS.

Another less important rule is keeping the result set small, for example using
“WHERE” clause as much as possible. Although less important, it also is
important, because an array fetch of unnecessary records can be expensive to
the SAP Buffer.

Code Inspector (Transaction SCI) can be used to get the performance issues in
the code within the Migration to S/4HANA. You must fill a Name for the
Inspection. For example:

By clicking on the button “Create“:

https://blogs.sap.com/2020/03/06/abap-migration-to-s-4hana-first-questions/ 2/12
2/12/22, 9:02 AM ABAP Migration to S/4HANA – First Questions | SAP Blogs

Marking a Single “Object Selection“, filling up the name of the Program and using
the object variant “PERFORMANCE_DB“ you could get the next message:

By clicking on the green check you could get the message:

By clicking on the “Results” button:

You could get the list of Errors, Warnings, and Informations about Performance
Issues.

It’s possible to expand each of these items to see the detail of the issue:

https://blogs.sap.com/2020/03/06/abap-migration-to-s-4hana-first-questions/ 3/12
2/12/22, 9:02 AM ABAP Migration to S/4HANA – First Questions | SAP Blogs

By double click, also go directly to the line of code:

It’s possible to use other classic tools like:

ATC transaction: to use with the same variant (PERFORMANCE_DB) in a more


holistic way that SCI.
ST05 transaction: trace programs to find Database Access with execution
time.
SAT transaction: a set of trace elements as Hit List, DB tables, Profiling, and
Times.

A new ABAP Profiling Perspective in Eclipse is available and this tool is similar to
SAT transaction, but enriches with other elements like for example Call
Diagrams.

The figure below summarizes a flow diagram of Custom ABAP Code Migration
Scenarios:

https://blogs.sap.com/2020/03/06/abap-migration-to-s-4hana-first-questions/ 4/12
2/12/22, 9:02 AM ABAP Migration to S/4HANA – First Questions | SAP Blogs

Which other new tools are available with S/4HANA?


To improve performance, reuse data objects and to allow the possibility of
modeling, other development’s objects appear in the ABAP’s radar:

CDS Views
AMDPs
Calculation Views
Stored Procedures
External Views
Database Procedures Proxies

These new objects would conform to a new and very important golden rule:

Code to Data: this means, work intensely in the database (or close to the
database) like a “Push Down Capability”, doing extractions, aggregations,
calculations, and many other operations directly on the database server.

The new tools in Eclipse to build these objects are the ABAP Development Tools
(ADT) and the Hana Studio. ADT is a tool that contains two types of experiences.
The first is like SAP Classic GUI that is good to work with the Screen Painter and
the second named “Look and Feel” is a new tool with its own characteristics as
code templates to Object-Oriented Programming, Code Completion, and Quick
Fix possibilities. The figure below summarizes the integration provided by
Eclipse:

https://blogs.sap.com/2020/03/06/abap-migration-to-s-4hana-first-questions/ 5/12
2/12/22, 9:02 AM ABAP Migration to S/4HANA – First Questions | SAP Blogs

Hana Studio lets to build/edit Calculation Views and Stored Procedures and
Eclipse is also an environment that lets to work with other programming
languages as for example JAVA and SAP UI5. Right now there are also tools in the
SAP Cloud Platform that contain some of the capacities of ADT and Hana Studio.

On the other hand, the ABAP Open SQL is now enriched with new sentences and
it offers the possibility of use until 50 join’s tables and 50 subqueries.

The use of the new Hana Database as the primary element implies that
Secondary Indexes are not relevant and aggregations are dropped. Also, many
tables that previously were Table Pools and Clusters, are transparent now. The
following figure summarizes this discussion:

In conclusion, within a Migration of custom ABAP code to S/4HANA, the


performance in all cases is not faster immediately. The main classic ABAP rules
that remain valid are:

1. Minimize the amount of transferred data.


2. Minimize the number of database accesses

https://blogs.sap.com/2020/03/06/abap-migration-to-s-4hana-first-questions/ 6/12
2/12/22, 9:02 AM ABAP Migration to S/4HANA – First Questions | SAP Blogs

3. Keep the result set small

The less important rules are:

Minimize search overhead


Keep unnecessary load away from the DB

Instead of these less important rules, a new principle is established: Code to


Data, which means work hard in the Database and transfer the results to ABAP
Server.

New tools are available to ABAP Development, for example ABAP Development
Tools (ADT) and HANA Studio. These tools let to build and edit new repository
objects and do performance tests with new elements of analysis.

Thus, S/4HANA as the newest SAP’s platform without precedents in


performance and innovations, like any other change in any other human’s topic,
could susceptible to a great debate to other blogs. Quoting to Heraclitus that said
“The Only Thing That Is Constant Is Change” You may think that although
S/4HANA is the latest technology, obviously it will not be the last.

By the way, in February 2020, SAP announced that support to S/4HANA will go
until 2040. Then, maybe in the “SAP’s Kitchen” a new platform itself could be
cooking right now, or at least the ingredients are getting ready. But, it remains
only as speculation of the author. The time will judge and every day brings its own
concern.

Likewise, I invite you to read the continuation of this article found at the following
link:

https://blogs.sap.com/2020/05/22/abap-migration-to-s-4hana-first-questions-
part-2/

I hope that these articles help other people to build some knowledge of ABAP
Migration to S/4HANA and open the mind to other questions. All comments and
suggestions are welcome.

Alert Moderator

https://blogs.sap.com/2020/03/06/abap-migration-to-s-4hana-first-questions/ 7/12
2/12/22, 9:02 AM ABAP Migration to S/4HANA – First Questions | SAP Blogs

Assigned Tags

ABAP Development

SAP HANA

SAP S/4HANA

SAP S/4HANA Embedded Analytics

#ABAP

ABAP code S/4HANA

Abap Golden Rules

View more...

Similar Blog Posts 


Custom code adaptation for SAP S/4HANA - FAQ
By Olga Dolinskaja Jun 25, 2019

ABAP custom code analysis using SAP Business Technology Platform


By Olga Dolinskaja Sep 23, 2019

ABAP Platform for SAP S/4HANA 1809


By Olga Dolinskaja Oct 01, 2018

Related Questions 
S4 hana abap
By magdy rezk Jun 25, 2021

ABAP Migration to S/4 HANA and the new Data Model


By Felix Fichtner Oct 18, 2016

How will S/4 HANA work without BDC?


By Jelena Perfiljeva Apr 08, 2016

Join the Conversation 


SAP TechEd
Tune in for tech talk. Stay for inspiration. Upskill your future.

https://blogs.sap.com/2020/03/06/abap-migration-to-s-4hana-first-questions/ 8/12
2/12/22, 9:02 AM ABAP Migration to S/4HANA – First Questions | SAP Blogs

SAP BTP Learning Group


SAP Business Technology Platform Learning Journeys.

Coffee Corner
Join the new Coffee Corner Discussion Group.

13 Comments

You must be Logged on to comment or reply to a post.

Francisco Rodriguez L.
March 6, 2020 at 10:10 pm

Great doc, very helpful. Thanks for share!.

Like 1 | Share

Jorge Augusto Portilla Garcia | Blog Post Author


March 7, 2020 at 1:59 am

Your welcome Francisco!

Like 0 | Share

Michael Keller
March 7, 2020 at 11:27 am

Thanks for sharing your experience! If someone need a starting point for ABAP Development Tools for
Eclipse, check this GitHub repository.

Like 2 | Share

Jorge Augusto Portilla Garcia | Blog Post Author


March 8, 2020 at 3:32 pm

Thanks Michael for your post.

Like 1 | Share

https://blogs.sap.com/2020/03/06/abap-migration-to-s-4hana-first-questions/ 9/12
2/12/22, 9:02 AM ABAP Migration to S/4HANA – First Questions | SAP Blogs

Jose Albeiro Huertas Martinez


March 8, 2020 at 11:28 am

Dear Jorge, I really appreciate your article and thank you for sharing it with us. I have read it carefully and I
agree with the content and conclusions. I would like to emphasize that ADT techniques are suggested to be
used when a business case requires it, but first having analyzed and discarded the basic ABAP techniques.
In other words, if a basic ABAP technique solves the requirement, give priority to this type of solution,
before implementing a more complex architectural solution

Like 2 | Share

Jorge Augusto Portilla Garcia | Blog Post Author


March 8, 2020 at 3:41 pm

Hi José Albeiro Huertas Martínez, Your welcome and Thank you very much for the time you took to
read the article. I greatly appreciate your point of view. Regarding ADT, I found a free way to use
ADT for ABAP testing purposes. I allow myself to share the link:

https://developers.sap.com/tutorials/ABAP_TRIAL/ADT

Like 0 | Share

Matt Billingham
March 12, 2020 at 9:39 am

ADT is a development environment. SAPGui provides a development environment. Neither are


solutions. Business case is irrelevant, surely?

I use ADT for all my development - HANA, non-HANA and for releases ranging from 7.31 to 7.50.

I'm sorry, but I really don't understand your point.

Like 0 | Share

Ged Hurst
March 9, 2020 at 8:48 am

So I learned some interesting perspectives on S/4 ABAP performance and Jacob Bernoulli; bravo!

Like 2 | Share

Jorge Augusto Portilla Garcia | Blog Post Author


March 9, 2020 at 3:34 pm

Thank you Ged!

Like 0 | Share

https://blogs.sap.com/2020/03/06/abap-migration-to-s-4hana-first-questions/ 10/12
2/12/22, 9:02 AM ABAP Migration to S/4HANA – First Questions | SAP Blogs

Matt Billingham
March 12, 2020 at 9:42 am

I seem to recall that SELECT field1, field2, … field99 FROM table... where there are exactly 99 fields in the
table, is still faster than SELECT * FROM table.

Maybe someone could test that.

Also, in your FOR ALL ENTRIES example - you should select into a SORTED table, rather than SORT after
selection. Just makes things a bit simpler. ?

Like 1 | Share

Jorge Augusto Portilla Garcia | Blog Post Author


March 12, 2020 at 2:56 pm

Hi Matt, Thanks for your post. In fact, "Minimize amount of transferred data." is a rule established
by SAP as a good practices in ABAP coding to S/4HANA. In some cases, you could need all fields
of table. Then you must to use asterisk. in other cases is better a detail list of fields because you
must to use machine resources rationally. Thus, if the table in the DB have 100 fields, it is
reasonable to use a detailed list if you are only going to use for example less than 10 fields.

"Also, in your FOR ALL ENTRIES example – you should select into a SORTED table, rather than
SORT after selection. Just makes things a bit simpler. ?" -> Yes, I'm totally with you, It is a better
way. The piece of code in the article is just an example and there must be many other better ways
to do it using other ABAP 7.5 statements. But the rule is valid.

I would like to invite you to write an article so that you can share your knowledge with the whole
community.

Regards.

Like 2 | Share

S Abinath
March 15, 2020 at 1:28 am

Hi Jorge Augusto Portilla Garcia,

Great doc, Interesting to read and apply thanks for sharing...

Regards,

Abinath. S

Like 1 | Share

Jorge Augusto Portilla Garcia | Blog Post Author


https://blogs.sap.com/2020/03/06/abap-migration-to-s-4hana-first-questions/ 11/12
2/12/22, 9:02 AM ABAP Migration to S/4HANA – First Questions | SAP Blogs

March 15, 2020 at 3:14 am

Hi S Abinath

your welcome, thanks for your post!

Like 0 | Share

Find us on

Privacy Terms of Use

Legal Disclosure Copyright

Trademark Cookie Preferences

Newsletter Support

https://blogs.sap.com/2020/03/06/abap-migration-to-s-4hana-first-questions/ 12/12

You might also like