Dear all,
Writing code is an Art.
Human mind can incept countless ways to implement single piece of logic.
Same process of writing a code can elevate/affect the performance of the code in many ways.
Hence benchmarking is needed to guide developers to write most efficient code possible.
Enter BTP!
Developers who are getting introduced to wonders of SAP BTP services will need a tool to validate the code that will follow new guidelines to write code.
Scope of current tutorial
We will be having a peek at the practical example where we will evaluate the code written in SAP BTP ABAP Runtime environment. Migration checks will be carried out on the code to validate its adherence with the code writing guidelines optimized for BTP ABAP Environment.
Prerequisite
If you are not yet aligned with below prerequisite, follow links given in front of the topic
- Trial Account in SAP BTP with ABAP Runtime Entitlement. ( Link )
- Dev space creation. ( Link )
- Login to Eclipse ADT. ( Link )
How to?
Once you are logged into Eclipse, make sure that you have created a package and have some not so efficient 😉 code written in it.
Now, navigate to SAP BTP Cockpit > Services ( Expand it) > Instance and Subscriptions.
In newly opened page, you will see number of links, choose instance that you have created as an ABAP runtime, and it will open homepage for your user.
Browse for Custom Code Migration App and open it.
Create a new project of type SAP BTP Migration Project
Provide description and the source system.
In our case, source system is the same system on which we are carrying out this remediation. If you have connected an on-premises system to your BTP environment, remote code analysis can also be done using this app. ( how to connect? Connect Your On-Premise System with SAP BTP, ABAP Environment | Tutorials for SAP Developers )
In Advanced Configuration Tab, provide your package/packages information in include or exclude format.
Now, click on create to create the Migration Project.
Once created, it will show information of all parameters used to create it.
Once you click on refresh button you will be able to see the current status. ( One button displays Run Analysis again since initial analysis proactively starts once the project is created. You may see it as In Progress if your object set includes large number of objects. )
Once the analysis is complete, you will see the count under number of findings.
By clicking on it, you will be navigated to the list of findings.
Analysis Findings page consists of stats depicted by various charts. Changes in the view can be done based on the requirement. It gives an at a glance picture of various factors like findings by priority, findings by type of issue, Quick fix availability etc.
Clicking on the object name hyperlink, will navigate you to the actual point in code where you will see the code statement. Actual correction needs to be done by navigating to code manually or from Eclipse via a hyperlink provided in the right top corner.
It can then be corrected based on the provided suggestions.
Conclusion
Custom Code migration tool enables the developer to write an efficient code that will resourcefully run in SAP BTP ABAP Runtime.
Further Reading
ABAP Test Cockpit in the Cloud – What is already possible | SAP Blogs
Follow my profile to be notified of the next blog post. Please feel free to ask any questions you have in the comments section below.
Follow the SAP BTP, ABAP environment topic page SAP BTP ABAP Environment
Post and answer questions Questions& Answers, and read other posts on the topic SAP BTP, ABAP environment