Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
Showing results for 
Search instead for 
Did you mean: 
Product and Topic Expert
Product and Topic Expert
Hopefully you have already heard the news that the SAP S/4HANA 2022 release is out now for on premise and private cloud customers including the new ABAP cloud development approach for ABAP custom extensions. As the Chief Product Owner of the ABAP Platform boris.gebhardt outlined in the blog post How to use Embedded Steampunk in SAP S/4HANA Cloud, private edition and in on-premise – The new ABAP... we have now the same extensibility capabilities in SAP S/4HANA 2022 on premise and SAP S/4HANA 2022 Private Cloud Edition as in SAP S/4HANA 2208 Public Cloud.

The new on-stack developer extensibility option (Embedded Steampunk) allows customers and partners to create cloud-ready and upgrade-stable ABAP extensions. The details about this new extensibility option can be found in the new ABAP Extensibility guide. The new ABAP cloud development model is important both for new customers and partners to create new extensions and for existing customers and partners to start a new extension project.

In the chapter 6 of  the new ABAP Extensibility guide we also outline how customers and partners with existing custom code can transform their extensions in a step-by-step approach towards the new ABAP cloud development model. It can be achieved by separating custom code from the SAP core application and implementing all accesses to SAP business objects only through well defined, cloud-ready and upgrade-stable interfaces.

The focus of this blog is on the custom code, which is tightly coupled with the core application logic of SAP S/4HANA and can be renovated or innovated on-stack directly on the SAP S/4HANA ABAP platform using Embedded Steampunk. The side-by-side renovation or innovation of custom code on SAP BTP ABAP Environment (Steampunk) is covered in the blogs How to bring your ABAP custom code to SAP BTP ABAP Environment and Semi-automatic custom code adaptation for SAP BTP ABAP Environment.

With this blog post we want to demonstrate with a very simple example (Hello World like) which tools are offered to ease the adaptation of existing custom code towards the new extensibility option with Embedded Steampunk.

Now let’s make a custom code object in your SAP S/4HANA 2022 system cloud-ready.

Check your custom code for cloud readiness

First, we need to check the custom code object (class ZCL_MATERIAL_INFORMATION in our example) for cloud readiness. For this just execute ABAP Test Cockpit (ATC) in the ABAP Development Tools in Eclipse with the cloud readiness checks over this class:

The results related to the cloud issues in the custom code are displayed in the ATC Problems View. The findings marked with the yellow light bulb can be fixed with Quick Fixes.

Apply Quick Fixes in the ADT in Eclipse

Therefore, we can start adapting the code using the mass-enabled Quick Fixes (just select all findings and apply the Recommended Quick Fixes context menu):

Before we agree to the Quick Fixes proposals, we can review the proposed cloud readiness changes in the corresponding “before” (Original Source) and “after” (Refactored Source) editors:

In this example the custom boolean data type boole_d needs to be replaced with the only released for the usage in the cloud the ABAP_BOOLEAN data type, the access to the SY structure fields must be done not directly but using the corresponding API, you need to escape with @ the host variables and use the assignment operator instead of the MOVE statement. Finally press the Finish button to apply the Quick Fixes.

After applying the Quick Fixes if we run again ABAP Test Cockpit with the cloud readiness checks over our custom code object ZCL_MATERIAL_INFORMATION, the remaining cloud issues will be displayed in the ATC Problems View:

Use released APIs

Let’s take a closer look at the ATC findings list. The selected finding shows for example, that our custom code uses the not released application API. It means, it accesses the table T006 directly whereby the direct access to the table T006 is not permitted in the cloud and the released application API, the CDS view I_UNITOFMEASURE, must be used instead. In this way you see that the information about the successor released object is provided directly in the details of an ATC finding and you can use it for the correction.

After applying the necessary implementation changes to the custom code object ZCL_MATERIAL_INFORMATION in order to use the I_UNITOFMEASURE CDS view to access the table T006 we can proceed the same way for other remaining ATC findings. Finally, after we execute again the ABAP Test Cockpit cloud readiness checks we will get the empty ATC findings list:

Now our class ZCL_MATERIAL_INFORMATION is cloud ready.

In the near future we plan also to provide the information about the successor released APIs in the analysis results, when using Custom Code Migration app on SAP BTP for the remote check of an on-premise SAP system. This information will also support you to find the appropriate cloud ready successor for the not released APIs in your custom code on the SAP releases before the SAP S/4HANA 2022.

Support for older SAP S/4HANA releases

If your SAP S/4HANA system is on the older release, then the information about the successor released object is not available in the details of an ATC finding, and you will get only the notification, that your code uses not released API, e.g. direct access to the application table MARA:

Therefore if you want to check your custom code for cloud readiness in the releases before SAP S/4HANA 2022 see the blog How to check your custom code for ABAP Cloud using the Cloudification Repository on GitHub, which provides the list of released APIs.