If you are involved in a SAP HANA system conversion project and take care of the custom code (see also the blog SAP S/4HANA System Conversion – Custom code adaptation process) at a time you will reach the point, where you will need to do functional adaptation for your custom code on your brand new SAP S/4HANA system.
For this purpose, you will run ABAP Test Cockpit with the S4HANA_READINESS check variant on your SAP S/4HANA system and will get a long list of ATC findings which you need to fix.
No doubt, it as a substantial manual effort to look at every ATC finding and adjust your custom code. Besides this, often the most ATC findings are the SAP S/4HANA standard known issues, which could be fixed quickly without dipping into source code analysis, reading SAP Notes for adaptation guidance and so on.
Therefore, in order to minimize your adaptation efforts, we started to offer automatic code adaptations using the Quick Fixes (or Ctrl +1 shortcut) feature of ABAP Development Tools in Eclipse (ADT).
Client: ABAP Development Tools (ADT) 2.96
Backend: ABAP platform 1809 (AS ABAP 7.53 SP00)
First Quick Fixes for SAP HANA related issues (SELECT without ORDER BY)
One of the typical functional adaptation use cases during SAP HANA migration is the missing ORDER BY clause in SELECTs before the READ statement. According to the SQL specification, you can not rely on the sort order in SELECT without ORDER BY. This can lead to unexpected behavior when the database is changed (for example to SAP HANA) because the results return in a different order without ORDER BY.
When you check your ABAP code containing such issues with ABAP Test Cockpit in ABAP Development Tools (ADT), you will most probably get a long list of ATC findings in your ATC Problems View at READ.. BINARY SEARCH statements, which were caused by the missing ORDER BY clauses in the previous SELECTs.
TIP: How to display ATC findings directly in the editor
Go to the top menu Window->Preferences in your Eclipse IDE and under General->Editors->Text Editors choose the following:
Now you can correct such issues automatically via ADT Quick Fixes.
|Note: ATC findings that can be fixed with a Quick Fix are displayed with a lightbulb icon|
There are two possibilities for applying Quick Fixes.
You can select an ATC finding and choose Quick Fix (or Ctrl + 1 shortcut) in the context menu:
Then select the displayed Quick Fix in the popup and press Finish button:
Recommendation: If there is more than one Quick Fix available for an ATC finding, we recommend to select the first Quick Fix displayed.
Alternatively, you can jump to the affected source code line by double clicking the corresponding ATC finding and choose Quick Fix in the context menu (or Ctrl + 1 shortcut). Double-click the Quick Fix in the popup to apply it to the affected source code line.
That’s it. You can save and activate your source code and rerun ATC.
Further Quick Fixes
Further Quick Fixes for the most prominent SAP S/4HANA simplification use cases which are suitable for automatic adaptations are available with the SAP Note 2738251. These Quick Fixes are applicable for most accesses to database tables VBFA, VBUK, VBUP, KONV, BSEG and usage of VBTYPE data elements in source code. With the SAP Note 2364938 also the QuickFix for some MATNR related findings is available.
NOTE: It depends on the finding in the custom code whether a quick fix can be offered or not.
Here is the overview of the ATC checks and corresponding simplification items, for which the Quick Fixes are currently available:
|Check||Simplification Item||Referenced Object|
S/4HANA: Field length extensions
Checks report the following:
|2215852 – Material Number Field
Length Extension: Code AdaptationsPrerequisite: the material number field length extension is not used in SAP S/4HANA.2610650 – Amount Field Length Extension: Code Adaptations
Prerequisite: the amount field length extension is not used in SAP S/4HANA.
NOTE: There are currently no quick fixes to adapt calls to function modules or BAPIs which are reported by the check “S/4HANA: Search usages of simplified objects”.
|for example MATNR|
|S/4HANA: Search for database operations||2198647 – S/4 HANA: Data Model
Changes in SD
|VBFA, VBUK, VBUP, VBTYP|
|2220005 – S/4 HANA: Data Model
Changes in Pricing and Condition Technique
|2431747 – General Ledger: Incompatible
changes in S/4HANA compared to classic ERP releases
|2768887 – S4TWL – SD Billing Document Draft||VBFK, VBFP|
|S/4HANA: Search for usages of simplified objects||2198647 – S/4 HANA: Data Model
Changes in SD
|S/4HANA: Search for S/4 related syntax errors||VBTYP|
|Search problematic statements for result of SELECT/OPEN CURSOR without
|1912445 – ABAP custom code migration for SAP HANA|
|S/4HANA: Search for database operations, simplified database tables VBRK and VBRP||2879257 – Reducing findings for VBRK and VBRP in ‘S/4HANA: Search for database operations’||VBRK, VBRP|
More information can be found in the SAP Note 2866977 “Quick Fixes for SAP HANA custom code checks”.
Mass-enabled Quick Fixes
Beyond this the mass-enabled Quick Fixes are now available with ABAP Development Tools 3.0 and ABAP Platform 1809 FPS01, which make it possible to adapt full packages or software components in one shot and in this way drastically reduce your custom code adaptation efforts. You can also get mass-enabled Quick Fixes on SAP S/4HANA 1809 FPS00 by applying the SAP Note 2695592.
To apply mass-enabled Quick Fixes you first either need to execute an ATC run over your code to get a list of ATC findings in the ATC Problems View or if you already have a local ATC result you can take it over from the ATC Result Browser to the ATC Problems View:
After that just select multiple ATC findings in your ATC result and use the context menu Recommended Quick Fixes…:
The wizard with recommended Quick Fixes for your selected ATC findings starts:
If you press Finish button, you apply the Quick Fixes for all your selected ATC findings, for which the Quick Fixes are available, at one shot.
Comments for “old source code” in Quick Fixes
While applying a Quick Fix now it is possible to add comments to the refactored code containing the “old source code”. For more details see the blog Comments for the ADT Quick Fixes.