ℹ️ Last Update: April 2026
Over past years SAP customers have heavily extended and modified SAP solutions. There are SAP ECC systems with a few million lines of custom code. During a system conversion to SAP S/4HANA or a migration to SAP BTP ABAP environment customers want to reuse the existing custom code.
Simplified the custom code migration process looks like this: you need to define the scope of custom code for migration, analyze it for SAP S/4HANA or cloud readiness, migrate it to the new environment and adapt it for SAP S/4HANA or SAP BTP ABAP environment accordingly.

Custom Code Migration App and ABAP development tools in Eclipse with quick fixes are the tools of choice for custom code analysis and adaptation supporting custom code projects within an SAP S/4HANA conversion or a migration to SAP BTP ABAP environment. Since custom code migration topic is so important for the SAP customers, we have included the Custom Code Migration app into the RISE with SAP offer, and it is available in every RISE with SAP subscription. For more information see also the blog RISE with SAP and custom code migration – What is included.
In the following we will take a closer look at the process steps of the custom code migration to SAP S/4HANA and SAP BTP ABAP environment and give you the recommendations on which information can assist you during realization of your tasks at each process step.
In an average SAP ECC system, a large part of custom code is never executed in the production. Therefore, removing unused and obsolete code will significantly reduce the effort for custom code adaptation. SAP recommendation is at least 1 year prior to your SAP S/4HANA conversion project or migration project to SAP BTP ABAP Environment to collect usage data in your productive systems using ABAP Call Monitor (SCMON) and SUSG transactions. See the blogs ABAP Call Monitor (SCMON) – Analyze usage of your code and Aggregate usage data in your production system with SUSG transaction for details. If you already collected (or still collect) usage data with the SAP Solution Manager and UPL (Usage Procedure Logging) these usage data can be also considered.
The central entry point to the topic of the custom code migration to SAP S/4HANA is the blog SAP S/4HANA System Conversion – Custom code adaptation process. All frequently asked questions along with the answers regarding this topic are collected in the Custom code adaptation for SAP S/4HANA – FAQ.
First you need to define a custom code scope for migration. For this we recommend setting up the Custom Code Migration app. In the Custom Code Migration app you can create a custom code migration project and upload your collected usage data (if available). If you collected the usage data with the SAP Solution Manager see the blog How to upload usage data from the SAP Solution Manager to the SAP Fiori App Custom Code Migration. If you upload the collected usage data, the app will define the initial custom code migration scope based on the usage data. Afterwards you can adjust the scope manually. We also recommend using the complexity analysis in the Custom Code Migration app to refine the scope by spotting top TCO drivers in your custom code. See the blog Custom code analysis for SAP S/4HANA with SAP Fiori App Custom Code Migration for more details on the technical setup of the Custom Code Migration app and scoping of your custom code for migration.
To accelerate analysis and adaptation tasks and enhance productivity during custom code migration projects you can use AI-based support provided within SAP Joule for Developers, ABAP AI capabilities in the Custom Code Migration app and ABAP development tools for Eclipse. See the blog post Custom code migration to SAP S/4HANA powered by SAP Joule for Developers, ABAP AI capabilities for more details.
Next you need to analyze your custom code for the compatibility with the SAP S/4HANA. Custom Code Migration app performs SAP S/4HANA readiness checks over your custom code in the SAP ECC system and provides detailed analysis results with advanced filtering and navigation capabilities and various chart views. These SAP S/4HANA analysis results should be used as a foundation for all custom code adaptation activities. See the blog Custom code analysis for SAP S/4HANA with SAP Fiori App Custom Code Migration for more details on custom code analysis.
During system conversion, the SAP Software Update Manager will take over all your custom code from the SAP ECC source system into the target SAP S/4HANA system. Prerequisite is that the respective object catalog and software component information are correctly maintained for your custom code objects (see the SAP Note 2318321). During scoping the Custom Code Migration App allows you to specify custom code objects that shall not be taken over. A respective transport request is generated by the app. You can then provide this request to the Software Update Manager so that the tool will exclude those objects during the transition to SAP S/4HANA.
Alternatively, it is also possible to outsource and backup the unused custom code after system conversion, see the blog How to backup custom code with gCTS for more details.
The adaptation of your custom code to SAP S/4HANA takes place after the system conversion. We recommend using ABAP development tools for Eclipse for all custom code adaptation activities. You can significantly reduce your custom code adaptation efforts with the mass-enabled quick fixes in the ABAP development tools for Eclipse. Prerequisite for applying quick fixes is the local ABAP test cockpit run with the SAP S/4HANA readiness checks executed in the ABAP development tools for Eclipse over your custom code in the new SAP S/4HANA system. For details on the custom code adaptation using the quick fixes see the blog Semi-automatic custom code adaptation after SAP S/4HANA system conversion.
Your system conversion to SAP S/4HANA is a given opportunity to invest into modernization of your custom code and clean core. First, we recommend optimization of your custom code for SAP HANA by adapting your performance critical SQLs found by the SQL monitor. Additionally, you can utilize SAP HANA usage by using ABAP CDS, AMDP and ABAP SQL.
We recommend reinforcing clean core development for your system governed by ABAP test cockpit (ATC) recommendations for governance of clean core ABAP development. See also the ABAP Extensibility Guide – Clean Core for SAP S/4HANA Cloud - August 2025 Update.
The use of the SAP Fiori UI and ABAP RESTful Application Programming model (RAP) will help you to modernize your custom code. Further significant optimization can be achieved if you look for the appropriate use cases for redesign with ABAP cloud development model using released SAP public APIs from ABAP platform and SAP S/4HANA to make your custom code cloud-ready and upgrade-stable. See also the blog How to make your custom code cloud-ready and upgrade-stable.
The ABAP extensibility guide , ABAP Extensibility community and the ABAP Cloud - Developer Resources section in the ABAP Development community provide further information.
First you need to define the custom code scope for migration. For this we recommend setting up the Custom Code Migration app. In the Custom Code Migration app you can create your custom code migration project. If you already know, which ABAP application you want to migrate to the SAP BTP ABAP environment then you just define the scope manually by taking this ABAP application into the scope. If you need first to find out, which ABAP custom code is suitable for cloud, we recommend you to proceed as following. Start with uploading the collected usage data (if available). If you collected the usage data with the SAP Solution Manager see the blog How to upload usage data from the SAP Solution Manager to the SAP Fiori App Custom Code Migration. The app will define the initial custom code migration scope based on the usage data. Afterwards we recommend applying the complexity analysis to the scoped custom code to track down top TCO drivers (complex custom code) as possible candidates for migration and finally the dependency analysis to determine custom code candidates, which are loosely coupled with SAP standard. In this way the custom code scope will be defined and refined. See the blog How to check your custom ABAP code for SAP BTP ABAP Environment for more details on the technical setup of the Custom Code Migration app and scoping your custom code for cloud migration. To finalize the custom code scope for cloud you need to assess the remaining scope with your business department to select the appropriate use cases for the cloud.
Next you need to analyze your custom code for the cloud. Custom Code Migration app performs cloud readiness checks over your custom code in the SAP private cloud or on-premise system and provides detailed analysis results with advanced filtering and navigation capabilities and various chart views. These analysis results should be used as a basis for all custom code adaptation activities for cloud. See the blog How to check your custom ABAP code for SAP BTP ABAP Environment for more details on custom code analysis.
For S/4HANA systems we recommend first to adapt your custom code for the SAP BTP ABAP environment using ABAP development tools for Eclipse. You can benefit from the mass-enabled quick fixes to reduce your custom code adaptation efforts. Prerequisite for applying the quick fixes is the local ABAP test cockpit run with cloud readiness checks executed over your custom code. For details on the custom code adaptation for cloud using quick fixes see the blog Semi-automated custom code adaptation for SAP BTP ABAP Environment.
For the custom code migration to the SAP BTP ABAP Environment we recommend the abapGit. You can export your custom code to the external Git repository using the abapGit plugin in your on-premise SAP ECC system and import it into the cloud ABAP system in the SAP BTP ABAP environment using the abapGit plugin in the ABAP development tools for Eclipse. See also the blog How to bring your ABAP custom code to SAP BTP ABAP Environment for more details on the custom code migration with the abapGit.
If you migrate your custom code from the SAP ECC system, then the adaptation of your custom code to the SAP BTP ABAP environment must take place in the SAP BTP ABAP environment system with ABAP development tools for Eclipse. For this purpose, you would need to fix syntax errors in your migrated custom code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 36 | |
| 28 | |
| 27 | |
| 26 | |
| 26 | |
| 26 | |
| 24 | |
| 23 | |
| 22 | |
| 22 |