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

  1. Trial Account in SAP BTP with ABAP Runtime Entitlement. ( Link )
  2. Dev space creation. ( Link )
  3. 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.

Eclipse%20ATD%20Screenshot

Eclipse ATD Screenshot with BTP Cloud system logged in

Now, navigate to SAP BTP Cockpit > Services ( Expand it) > Instance and Subscriptions.

BTP%20ABAP%20Services%20dashboard%20link

BTP ABAP Services dashboard link

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.

BTP%20ABAP%20Environment%20homepage

BTP ABAP Environment homepage

Create a new project of type SAP BTP Migration Project

New%20Migration%20Project

New 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 )

Selecting%20Source%20for%20scanning%20the%20code

Selecting Source for scanning the code

In Advanced Configuration Tab, provide your package/packages information in include or exclude format.

Additional%20restrictions/filters

Additional restrictions/filters

Now, click on create to create the Migration Project.

Once created, it will show information of all parameters used to create it.

Analysis%20run

Analysis run not started

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. )

Analysis%20in%20progress

Analysis in progress

Once the analysis is complete, you will see the count under number of findings.

Analysis%20Count

Analysis Count

By clicking on it, you will be navigated to the list of findings.

Findings%20List

Findings List

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.

Actual%20code

Actual code

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

Sara Sampaio

Sara Sampaio

Author Since: March 10, 2022

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x