As you for sure already know, ABAP Cloud was announced at SAP TechEd 2022 and was part of the Juergen Mueller’s day 1 and Philipp Herzig’s day 2 keynotes. ABAP Cloud is the ABAP development model to build cloud-ready business apps, services, and extensions on the SAP products SAP BTP ABAP Environment, SAP S/4HANA Cloud, public edition, and SAP S/4HANA 2022 Cloud, private edition and on-premise.
You can find more details about ABAP Cloud in the ABAP Development SAP Community under the „ABAP Cloud – Developer Resources“ section, and in the ABAP Cloud blog by the Chief Product Owner of the ABAP Platform Boris Gebhardt.
As we have thought about, how to support SAP customers and partners, who want to strive for the clean core with ABAP Cloud in their landscapes and use released APIs as much as possible we came up with the following considerations.
Currently you can use the Custom Code Migration app to check your custom code for cloud readiness with the purpose of migration to the SAP BTP ABAP Environment. See also the blog How to check your custom ABAP code for SAP BTP ABAP Environment. In this case the cloud readiness checks will be executed over your custom code in the on-premise system to detect, if your custom code is compliant to the ABAP language version „ABAP for Cloud Development“ , if it uses only allowed object types in the cloud, or if it uses only released APIs of the SAP BTP ABAP Environment system.
These checks are essential for the custom code migration to the SAP BTP ABAP Environment but insufficient if you want to check your custom code for ABAP cloud development model in an SAP S/4HANA system. In this case you would need additionally check your code for the released application APIs of the SAP S/4HANA solution in the target systems, and ideally already get the recommendation which successor released APIs from the SAP S/4HANA application stack to use.
Based on these considerations we have got an idea to provide the information about the released successor APIs for ABAP cloud development on the GitHub in the so-called Cloudification Repository. This information can be then used as the input for the ABAP Test Cockpit cloud readiness checks for released APIs (analogous to the Simplification Database for SAP S/4HANA readiness checks).
The Cloudification Repository can be used with the latest version of the Custom Code Migration app in the SAP BTP ABAP Environment (2302 release).
NOTE: The Cloudification Repository is the substitute for using the SAP Note 3088062 – Identifying local APIs for S/4HANA Cloud, where you need to look up for the successor released APIs manually in the Excel table. |
Let’s take a look in detail at how it works.
Choose a custom code package for analysis
We take as an example the ABAP custom code package ZS4HANA_CLOUD_MIGRATION_DEMO in the SAP ERP system. This package should be migrated to the SAP S/4HANA Cloud, public edition, and therefore it must be adapted compliant to the ABAP cloud development model.
This package contains among other things the ABAP source code objects, like for example the classes ZCL_MARA_USAGE and ZCL_KONV_USAGE which are not compliant to the ABAP cloud development model, because they access directly with the openSQL the SAP application tables MARA and KONV instead of using the corresponding released APIs:
Other ABAP source code objects in this package are also not compliant to the ABAP cloud development model. Hence we need to analyze the package to understand, which issues we need to solve on the way to the custom code migration to ABAP Cloud.
Cloudification Repository
We will use the latest Custom Code Migration app on the SAP BTP ABAP Environment (2302 release) for custom code analysis, and since the app is not able to show the successor released API in the analysis result, because it has no knowledge about which released APIs must be used in the target SAP S/4HANA Public Cloud system, we need to use the Cloudification Repository.
The Cloudification Repository is available on the GitHub, under the link https://github.com/SAP/abap-atc-cr-cv-s4hc you can get an overview about it:
Just take a look at the content of the objectReleaseInfoLatest.json file under the „src“:
It contains the released APIs in JSON format. In this JSON file you can search for example for the successor of the direct access to the table KONV. You will find the table KONV there, information about the software component („SAPCORE“) and the application component („SD-BF-PR“). The successor information points to the DDL as CDS View („I_SLSPRCGCONDITIONRECORD“), which must be used instead of direct access to the table KONV:
You can proceed the same way and look for example for the successor of the direct access to the table BSEG, and you will find the CDS View I_OPERATIONALACCTGDOCITEM and so on.
Create your own ATC check variant using the Cloudification Repository
If we now display the ABAP_CLOUD_READINESS check variant in the SAP BTP ABAP Environment system, where our Custom Code Migration app will run, we will see, that under the Cloud Readiness checks category it contains the new check „Usage of Released APIs (Cloudification Repository)“ :
This check takes as a parameter the link to the Cloudification Repository JSON file.
We will just copy the ABAP_CLOUD_READINESS check variant (context menu „Duplicate“ in the Project Explorer or see the blog How to create and use your own ATC check variant in SAP BTP ABAP Environment for further details) and create the new ZMY_ ABAP_CLOUD_READINESS check variant. There we will unselect the check „Usage of Released APIs“ and select the new check „Usage of Released APIs (Cloudification Repository)“, and then in the details of the check we will provide the link to the Cloudification Repository JSON file:
Finally we will save and activate our new ATC check variant ZMY_ ABAP_CLOUD_READINESS. It is now ready to use.
Analyze your custom code for ABAP Cloud
Now it’s time to analyze the custom code example package ZS4HANA_CLOUD_MIGRATION_DEMO in our ERP system for ABAP Cloud using the Cloudification Repository. For that we start the Custom Code Migration app in the SAP BTP ABAP Environment system, where we have just created the new ZMY_ ABAP_CLOUD_READINESS check variant and create the new Custom Code Analysis Project:
This project will connect to our ERP system and check with the new ZMY_ ABAP_CLOUD_READINESS check variant the custom code example package ZS4HANA_CLOUD_MIGRATION_DEMO ( we provide it under the „Advanced Configuration“):
After we click the Create button the analysis will start. As soon as analysis is finished you will see, that we have the 23 findings in our custom code and can click on this number to see the analysis results.
In the analysis results we apply the filter to display only findings which are related to usage of not released APIs in our custom code package example in order to focus only on the findings for which the successor information is provided in the Cloudification Repository:
In the table with findings we can now for example select the line with the unallowed usage of the table KONV and click on the „>“ to get the details of this finding:
Here we will see the information from the Cloudification Repository JSON file about the successor CDS view, which must be used for the ABAP cloud development instead of direct access to the table KONV.
By the way you can also use the Cloudification Repository with the Custom Code Migration app on-premise or SAP GUI ATC (in the SAP S/4HANA >=2020 system) after implementing the SAP Note 3284711 – ATC Check for Released Objects (Cloudification Repository).
Using the Custom Code Migration app and Cloudification Repository you can now analyze your custom code in the on-premise systems for the ABAP Cloud and estimate the effort for the future adaptations.