Professional Documents
Culture Documents
Community
Shakeel Ahmed
February 8, 2018 3 minute read
# Overview
This Article will help SAP Application Consultants who have passion for ABAP coding. It will cover followings:
This article has been made with the help of SAP ABAP Training and Training Material. Thanks to SAP for this.
When a customer migrates an existing SAP system to S/4HANA, the standard ABAP code is migrated, and if
necessary, adjusted automatically by the migration tools in order to run optimally on SAP HANA.
Although the migration tools move custom code to the new S/4HANA target system, there is no automatic
adjustment of the code.
The good news is that, in most cases, the code will run as expected. However, an important task in a migration
to an S/4HANA project should be the detailed review of custom ABAP code in order to ensure the following:
https://blogs.sap.com/2018/02/08/code-review-code-inspector-code-pushdown-key-changes-in-abap-s4hana/ 1/13
3/11/2021 Code Review, Code Inspector, Code Pushdown & Key Changes in ABAP – S/4HANA | SAP Blogs
That the custom code still functions as expected – there are a few coding techniques and database objects
that simply do not work in S/4HANA and must be replaced.
That the custom code runs optimally with SAP HANA. Although the code may run, there are easy
adjustments to the code that can make a huge impact on performance.
In the past, special types of ABAP tables were used in order to overcome limitations of the underlying
databases that powered SAP applications.
The tables shown in the gure are called pool and cluster tables and are found in standard and custom ABAP
code. One of the key reasons for using special tables was to overcome design limitations of tables in certain
databases. The special tables sit in the ABAP layer on top of the physical database and act as a logical layer to
the ABAP code.
SAP S/4HANA does not need these special tables, and uses only one type of table, called a transparent table,
with no loss in performance or function. A transparent table has a one-to-one relationship with a physical table.
During migration, the special tables are converted to transparent tables. SAP standard code is automatically
adjusted to switch from calling the special tables to calling the transparent tables. Secondary indexes are
dropped during migration. Indexes are usually not required by SAP HANA. If your code refers to them, you must
make adjustments.
Customers and partners need to make their own checks and adjust their code where necessary.
However, if your custom code refers to a standard table that has now been removed, SAP provides views for all
removed tables. This means your code still works and just uses the view.
https://blogs.sap.com/2018/02/08/code-review-code-inspector-code-pushdown-key-changes-in-abap-s4hana/ 2/13
3/11/2021 Code Review, Code Inspector, Code Pushdown & Key Changes in ABAP – S/4HANA | SAP Blogs
Issues to watch for with the ABAP code that mean the application may not function as expected are as follows:
Review of native SQL: For example, functions that only work with MS SQL Server, and database hints to
override the SQL execution plan (for example, use this aggregate if it exists).
Avoid SELECT *: This is another way of asking for all columns in a record. SAP HANA’s column-based
database works better when you ask for only columns you need.
Do not assume a sort sequence of the results: Sort sequences were usually implied by the primary key, and
SAP HANA does not pre-sort the data. You must explicitly code this sort request, if needed.
Look out for the following items in your existing ABAP code in order to improve the performance:
Avoid SELECT *
SAP HANA’s column-based database works better when you ask for only columns you need, and avoid lling
memory with unwanted columns.
https://blogs.sap.com/2018/02/08/code-review-code-inspector-code-pushdown-key-changes-in-abap-s4hana/ 3/13
3/11/2021 Code Review, Code Inspector, Code Pushdown & Key Changes in ABAP – S/4HANA | SAP Blogs
Often, developers request all data (they do not use WHERE), and then they lter the data in the application
code.
Examples include aggregation, lters, and sorts. You do this by calling native SAP HANA database functions.
SAP provides tools to speed up and automate the code review phase and ensure nothing is missed.
ABAP Code Inspector allows developers to choose the type of checks they want to make. For example, the
following:
Code Checks
Usage and Procedure Logging (UPL) identi es dead code, or code that is rarely used. Do not waste time to
improve this if nobody uses it.
https://blogs.sap.com/2018/02/08/code-review-code-inspector-code-pushdown-key-changes-in-abap-s4hana/ 4/13
3/11/2021 Code Review, Code Inspector, Code Pushdown & Key Changes in ABAP – S/4HANA | SAP Blogs
Alert Moderator
Assigned tags
SAP S/4HANA | ABAP Connectivity | ABAP Development | SAP S/4HANA Finance | UI Web Dynpro ABAP |
View more...
What can you do today to prepare your custom code for SAP S/4HANA
By Olga Dolinskaja , Oct 12, 2017
SAP S/4HANA System Conversion – Challenge for your custom code
By Olga Dolinskaja , Feb 15, 2017
SAP S/4HANA Custom Code Adaptation
By Barbara Bollard , Jan 11, 2021
Related Questions
23 Comments
https://blogs.sap.com/2018/02/08/code-review-code-inspector-code-pushdown-key-changes-in-abap-s4hana/ 5/13
3/11/2021 Code Review, Code Inspector, Code Pushdown & Key Changes in ABAP – S/4HANA | SAP Blogs
Michelle Crapo
Interesting - a lot of this is a part of good coding practice for lower versions of SAP. Some of the "tables" going
away, now that is a change. It will be a big part of revising our code. Also we started with some analysis of if the
code is really needed. Is there something that replaced it? It is a good time to take inventory and get rid of as
many custom programs as possible. Another analysis is the business process can it be moved to a "SAP way of
doing things". This is at some point when we move to HANA . Until then I'm reading blogs, getting free training -
there was a migration class for data. It didn't include the code.
It looks like there will be a lot of manual changes. Of course the code inspector will help.
Michelle
Like(2)
Thanks Michelle. But I could not understand the question (Is there something that replaced it?
Regards
Shakeel
Like(0)
Michelle Crapo
No there isn't something that replaced it. No question, I was just leaving a comment. I wanted to add that there
was a data migration tool. There is a open course that covers the basics on how to use it.
I think Joachim makes my point better than I do. I think good coding practices would stop things like Select *.
When I posed my question, is there something that replaced it? I meant did the new version of SAP o er
something similar to the ABAP program. If it does, then the program is no longer needed.
https://blogs.sap.com/2018/02/08/code-review-code-inspector-code-pushdown-key-changes-in-abap-s4hana/ 6/13
3/11/2021 Code Review, Code Inspector, Code Pushdown & Key Changes in ABAP – S/4HANA | SAP Blogs
Michelle
Like(0)
Joachim Rees
Hi Shakeel,
a nice, high-level overview for that target group (SAP Application Consultants) you mentioned.
Often, developers request all data (they do not use WHERE), and then they lter the data in the application
code.
Another point worth mentioning: The cleanup of custom code (including elimination of no longer needed code)
can and should be done way up front of the actual conversion (the wording "migration" you use is not 100%
correct here, as SAP ERP and SAP S/4HANA are di erent products).
best
Joachim
Like(2)
Hi Joachim,
I am Functional Consultant-FICO and have limited knowledge about the ABAP. Please forgive if any
inconsistency or mistake is there.
Regards
Shakeel
Like(1)
Joachim Rees
https://blogs.sap.com/2018/02/08/code-review-code-inspector-code-pushdown-key-changes-in-abap-s4hana/ 7/13
3/11/2021 Code Review, Code Inspector, Code Pushdown & Key Changes in ABAP – S/4HANA | SAP Blogs
that's the nice part of community: you get feedback and additions by others and in the end, everyone bene ts!
Like(0)
Like(0)
Florian Henninger
Like(0)
Yep, most of these things have already been best practice for some time. And custom code should be revised
and improved constantly (ideally ).
There is a lot of information already available for the ABAPers regarding the changes in HANA or S/4HANA and
how we can start preparing. I'd suggest for the functional consultants to focus on their area of expertise and let
ABAPers do their job.
As a very high level overview, it is OK. I liked a simple explanation of the pool/cluster table concept. I sometimes
struggled to explain this in plain language to non-technical folks.
Like(4)
Dear Jelena,
https://blogs.sap.com/2018/02/08/code-review-code-inspector-code-pushdown-key-changes-in-abap-s4hana/ 8/13
3/11/2021 Code Review, Code Inspector, Code Pushdown & Key Changes in ABAP – S/4HANA | SAP Blogs
With all due rest I would like to call that ‘You are o ending’.
Best Regards
Shakeel
Like(0)
rest= respect
Like(0)
Like(0)
Joachim Rees
In theory yes, but in practice you often can't edit, because of this "We are unable to complete your request. You
may have been logged out from your session. Please re-login and try again."-bug!
Like(1)
Like(0)
https://blogs.sap.com/2018/02/08/code-review-code-inspector-code-pushdown-key-changes-in-abap-s4hana/ 9/13
3/11/2021 Code Review, Code Inspector, Code Pushdown & Key Changes in ABAP – S/4HANA | SAP Blogs
Like(0)
Dear Jelena,
Message is loud and clear. People would have understood about you and your thought process. I am done with
you and don’t have any more time for you.
Yes, you are really confused person and that you have accepted.
PS: was editing on mobile and some error was there. So thought let post separate reply for correction.
Regards
Shakeel
Like(0)
Uhm, OK... I still remain confused how exactly my comment o ends anyone. Perhaps you didn't notice the
smiley faces? Not sure if they're rendered well on a mobile device...
Even though it clearly was meant as rather "tongue-in-cheek", in all seriousness I do believe that it's better for
everyone to do their own job. Do you disagree with that? Then please share some arguments. You were asking
who am I - well, I'm an ABAP developer who had to x too many problems that were caused by the functional
consultants writing ABAP in the situations where they did not have enough knowledge to do it right. Does that
qualify me enough to have an opinion in the matter?
By any means, I'm all for "cross-training" and believe it's bene cial both for ABAPers to know about functional
aspects and for functional folks to know something about ABAP. But we all need to understand that learning a
bit about something does not necessarily make us an expert.
I'd like to highlight that my comment did not contain a personal attack on anyone. As a matter of fact, I did not
even criticize your blog. It is just OK, neither bad nor especially great as far as SCN blogs go. This is my personal
https://blogs.sap.com/2018/02/08/code-review-code-inspector-code-pushdown-key-changes-in-abap-s4hana/ 10/13
3/11/2021 Code Review, Code Inspector, Code Pushdown & Key Changes in ABAP – S/4HANA | SAP Blogs
opinion, anyone is free to disagree. It's rather unrealistic IMHO to expect everyone to have an opinion only to
your liking.
At the same time, your responses do look very much like a personal attack on me and I feel it's uncalled for.
Like(5)
Like(0)
PS: response to this line (" It is just OK, neither bad nor especially great as far as SCN blogs go") about the blog.
See below, it got selected for featured content on SAP community site. I hope you got t reply again.
https://blogs.sap.com/2018/02/08/code-review-code-inspector-code-pushdown-key-changes-in-abap-s4hana/ 11/13
3/11/2021 Code Review, Code Inspector, Code Pushdown & Key Changes in ABAP – S/4HANA | SAP Blogs
Like(0)
Joachim Rees
Like(0)
It was there for a week my friend. Why would you make such comments with screen shot? I did not get the
intention. It was not there for good.
Like(0)
https://blogs.sap.com/2018/02/08/code-review-code-inspector-code-pushdown-key-changes-in-abap-s4hana/ 12/13
3/11/2021 Code Review, Code Inspector, Code Pushdown & Key Changes in ABAP – S/4HANA | SAP Blogs
nabheet madan
February 16, 2018 at 8:45 am
Dear Shakeel
Thanks for writing the blog. I am back to SCN after long and catching up on things. I too feel Jelena
Per ljeva was not rude at all. All that is written in the blog are valid practices and can be found at many places if
we google.
Please understand whenever any one provide feedback take it in a constructive way and when that feedback
comes from Mentors then we shall it more seriously.
Thanks
Find us on
Newsletter Support
https://blogs.sap.com/2018/02/08/code-review-code-inspector-code-pushdown-key-changes-in-abap-s4hana/ 13/13